paste | R Documentation |
Joins multiple vectors of sequences into one vector.
## S3 method for class 'sq'
paste(..., NA_letter = getOption("tidysq_NA_letter"))
... |
[ |
NA_letter |
[ |
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.
sq
object of common type of input objects.
Common type is determined in the same process as for
c.sq()
.
Functions that affect order of elements:
bite()
,
collapse()
,
reverse()
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.