我需要从数据框的一列中逐一获取所有元素,以便将其应用于Map函数。但似乎我得到了长度为1的列表:
df['ids']
[[1]]
ids
1 "106248,110232"
2 "105799,110231"
3 "109832,110251"
> df1['pp_ids'][2]
Error in `[.data.frame`(df1["pp_ids"], 2) : undefined columns selected
我想要这样:
[[1]]
[1] "106248,110232"
[[2]]
[1] "105799,110231"
[[3]]
[1] "109832,110251"