words(seqinr)
words()所属R语言包:seqinr
To get all words from an alphabet.
从字母表中的所有单词。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Generates a vectors of all the words from a given alphabet, with right positions varying faster, for instance if the alphabet is (c("0","1") and the length is 2 you will obtain c("00", "01", "10", "11")
生成一个向量的所有的话从一个给定的字母,有合适的岗位,不同的速度更快,例如,如果alphabet(c("0","1")和length是2,您将得到c("00", "01", "10", "11")的
用法----------Usage----------
words(length = 3, alphabet = s2c("acgt"))
参数----------Arguments----------
参数:length
the number of characters in the words
词语中的字符数
参数:alphabet
a vector of characters
一个字符的矢量
值----------Value----------
A vector of string whith length characters.
的矢量字符串蒙山length字符。
(作者)----------Author(s)----------
J.R. Lobry
参考文献----------References----------
参见----------See Also----------
kronecker, outer
kronecker,outer
实例----------Examples----------
#[]
# Get all 64 codons:[获取所有64个密码子:]
#[]
stopifnot(all(words() ==
c("aaa", "aac", "aag", "aat", "aca", "acc", "acg", "act", "aga", "agc", "agg", "agt", "ata", "atc", "atg", "att",
"caa", "cac", "cag", "cat", "cca", "ccc", "ccg", "cct", "cga", "cgc", "cgg", "cgt", "cta", "ctc", "ctg", "ctt",
"gaa", "gac", "gag", "gat", "gca", "gcc", "gcg", "gct", "gga", "ggc", "ggg", "ggt", "gta", "gtc", "gtg", "gtt",
"taa", "tac", "tag", "tat", "tca", "tcc", "tcg", "tct", "tga", "tgc", "tgg", "tgt", "tta", "ttc", "ttg", "ttt")))
#[]
# Get all codons with u c a g for bases:[获取所有密码子与U C G的基准:]
#[]
words(alphabet = s2c("ucag"))
#[]
# Get all tetranucleotides:[获得所有四核苷酸:]
#[]
words(length = 4)
#[]
# Get all dipeptides:[所有的二肽:]
#[]
words(length = 2, alphabet = a()[-1])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|