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 中删除数据文件的空行
假设我有一个数据框df
df
我想从中选择行,其中行中的任何变量都不是NA. 也就是说我只想排除所有变量所在的行NA
NA
df[apply(!is.na(df), 1, any), ]