【发布时间】:2021-06-14 13:55:27
【问题描述】:
我正在尝试删除 4 和 5 相邻的所有行,所以我只想保留具有 4 和 5 但中间至少有一个数字的行。有人知道怎么做吗?
structure(list(data_rel_1 = c("4 5 5 5", "4 5 NA NA", "4 5 5 5",
"4 1 5 1", "4 5 5 5", "4 5 NA NA", "4 5 4 8", "4 10 5 5", "4 5 8 7"
)), row.names = c(NA, -9L), class = c("tbl_df", "tbl", "data.frame"
))
【问题讨论】: