Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

s2c

conversion of a string into a vector of chars


Description

This is a simple utility function to convert a single string such as "BigBang" into a vector of chars such as c("B", "i", "g", "B", "a", "n", "g").

Usage

s2c(string)

Arguments

string

a string of chars

Value

a vector of chars. If supplied argument is not a single string, a warning is issued and NA returned.

Author(s)

J.R. Lobry

References

citation("seqinr")

See Also

Examples

stopifnot(all(s2c("BigBang") == c("B", "i", "g", "B", "a", "n", "g")))

seqinr

Biological Sequences Retrieval and Analysis

v4.2-16
GPL (>= 2)
Authors
Delphine Charif [aut], Olivier Clerc [ctb], Carolin Frank [ctb], Jean R. Lobry [aut, cph], Anamaria Necşulea [ctb], Leonor Palmeira [ctb], Simon Penel [cre], Guy Perrière [ctb]
Initial release
2022-05-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.