Creating a sequence object from SPELL data

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 14:19:57

A quick look at the source of seqdef() for how the row.names are set shows they are set based on the value of the id argument.

Looking in ?seqdef for id shows

id
optional argument for setting the rownames of the sequence object. If NULL (default), the rownames are taken from the input data. If set to "auto", sequences are numbered from 1 to the number of sequences. A vector of rownames of length equal to the number of sequences may be specified as well.

From the example in the question you are passing id="ID" which does not meet these criteria. Changing this to id=NULL allows the command to complete as expected and a check for equality using identical( spell.seq, seqs) yields true.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!