paste {tidysq} | R Documentation |
Paste sequences in string-like fashion
Description
Joins multiple vectors of sequences into one vector.
Usage
## S3 method for class 'sq'
paste(..., NA_letter = getOption("tidysq_NA_letter"))
Arguments
... |
[ |
NA_letter |
[ |
Details
paste()
joins sequences in the same way as it does with strings.
All sq
objects must have the same length, that is, contain the same
number of sequences. An exception is made for scalar (length 1) sq
objects, which are replicated instead.
Value
sq
object of common type of input objects.
Common type is determined in the same process as for
c.sq()
.
See Also
Functions that affect order of elements:
bite()
,
collapse()
,
reverse()
Examples
# Creating objects to work on:
sq_dna_1 <- sq(c("TTCAGGGCTAG", "CGATTGC", "CAGTTTA"),
alphabet = "dna_bsc")
sq_dna_2 <- sq(c("ATCTTGAAG", "CATATGCGCTA", "ACGTGTCGA"),
alphabet = "dna_bsc")
sq_unt_1 <- sq(c("ATGCAGGA?", "TGACGAGCTTA", "", "TIAALGNIIYRAIE"))
sq_unt_2 <- sq(c("OVNU!!OK!!J", "GOK!MI!N!BB!", "DPOFIN!!", "??!?"))
# Pasting sequences:
collapse(sq_dna_1, sq_dna_2)
collapse(sq_unt_1, sq_unt_2)
collapse(sq_dna_2, sq_unt_2, sq_dna_1)
[Package tidysq version 1.1.3 Index]