Skip to content

Commit

Permalink
Use vapply instead of sapply
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-plessy committed Jun 25, 2024
1 parent 469f402 commit 8fd5f2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/normal_tandem_seq.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ setMethod("tandemNormalForm", "DNAString", function(seq, strand) {
.tandemNormalForm_onestrand <- function(seq) {
seq <- paste0(as.character(seq), as.character(seq)) |> factor()
# tandemNormalForm_rcpp expects the input to be already concatenated to itself
levels(seq) <- sapply(levels(seq), tandemNormalForm_rcpp)
levels(seq) <- vapply(levels(seq), tandemNormalForm_rcpp, "")
seq
}

0 comments on commit 8fd5f2d

Please sign in to comment.