我有一个大的数据帧列表。我想要移除其中一个特定的数据帧,例如这个例子中的d2。 my.list $d1 y1 y2 1 1 4 2 2 5 3 3 6 $d2 y1 y2 1 3 6 2 2 5 3 1 4
几个选择:# assign it to NULL my.list$d2 = NULL my.list[["d2"]] = NULL # remove second item my.list = my.list[-2] # subset by name my.list = my.list[names(my.list) != "d2"]
my.list[names(my.list) != "d2"]
- patLmy_list[["d2"]] <- NULL
- RLave