Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道如果您正确理解该语言,几乎可以在 R 中始终避免 for 循环,但我正在努力寻找这样做的聪明方法
for (i in 1:100){ AllData[[i]]$Div = NULL }
其中 AllData 是 100 个不同大小的列表的列表。有人可以给我线索吗?
像这样:
AllData <- lapply(AllData, `[[<-`, "Div", NULL)