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.
我如何确定一次计算的结果向量是否充满了 NA 值?谢谢
通过all(is.na(x)):
all(is.na(x))
R> x1 <- 1:3 R> all(is.na(x1)) [1] FALSE R> x2 <- x1 * NA R> all(is.na(x2)) [1] TRUE R>