我有一个数据帧,一旦我在col(X)中拆分术语,DF就变得不可写了。我被提示此错误
Error in .External2(C_writetable, x, file, nrow(x), p, rnames, sep,
eol, : unimplemented type 'list' in 'EncodeElement'
我最初的DF(DF1),它是可写的,看起来像这样
SentrixPosition Chormosomal.position
504 4578150569_R01C01 chr2:41238644-41245501
504.1 4578150569_R01C01 chr1:247849473-247925390
504.2 4578150569_R01C01 chr2:17221404-17232378
504.3 4578150569_R01C01 chr5:7177740-7202086
504.4 4578150569_R01C01 chr8:95721435-95744466
在字符串中将列Chormosomal.position拆分为另外3列。该文件不再可写,并且出现前面提到的错误。新的DF看起来像:
SentrixPosition Chormosomal.position chr startPos endPos
504 4578150569_R01C01 chr2:41238644-41245501 chr2 41238644 41245501
504.1 4578150569_R01C01 chr1:247849473-247925390 chr1 247849473 247925390
504.2 4578150569_R01C01 chr2:17221404-17232378 chr2 17221404 17232378
504.3 4578150569_R01C01 chr5:7177740-7202086 chr5 7177740 7202086
504.4 4578150569_R01C01 chr8:95721435-95744466 chr8 95721435 95744466