as.character.sq {tidysq} | R Documentation |
Convert sq object into character vector
Description
Coerces sequences from an sq
object to
character
vector of sequences.
Usage
## S3 method for class 'sq'
as.character(x, ..., NA_letter = getOption("tidysq_NA_letter"))
Arguments
x |
[ |
... |
further arguments to be passed from or to other methods. |
NA_letter |
[ |
Details
This method for sq
class allows converting sequences
from the sq
object into a character vector of length equal to the
length of input. Each element of resulting vector is a separate sequence.
All attributes of the input sq are lost during the conversion to character
vector.
Value
A character
vector where each element represents the content
of respective sequence in input sq
object.
See Also
Functions from output module:
as.matrix.sq()
,
as.sq()
,
export_sq()
,
write_fasta()
Examples
# Creating an object to work on:
sq_dna <- sq(c("CTGAATGCAGTACCGTAAT", "ATGCCGTAAATGCCAT", "CAGACCANNNATAG"),
alphabet = "dna_ext")
# Converting sq object into a character vector:
as.character(sq_dna)