If you insist on non-attribute vectors in the list:
- lapply( list(a, b, c), function(v) v[!is.na(v)] )
- D[i]=D[i][!is.na(D[i])]
- D[i]<<-D[i][!is.na(D[i])]
|
楼主: jxapp_6451
|
4633
9
[问答] Excel数据导入R,如何导入成列表形式 |
|
小学生 92%
-
|
20论坛币
最佳答案I would not worry about the attributes. It would not hurt and you will be able to use the elements of the list the same way as a vector without any attributes.
If you insist on non-attribute vectors in the list:In your loop you will have to replacebyto make it work.
回帖推荐zhangyangsmith 发表于2楼 查看完整内容 I would not worry about the attributes. It would not hurt and you will be able to use the elements of the list the same way as a vector without any attributes.
If you insist on non-attribute vectors in the list:In your loop you will have to replacebyto make it work.
| |
|
|
| ||
| ||
| ||
| ||
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


