摘要:
> a <- c(2,5,6,7) > b <- c(6,3,2,9) > c = rbind(a,b) > c [,1] [,2] [,3] [,4] a 2 5 6 7 b 6 3 2 9 > class(c) [1] "matrix" "array" > c <- data.frame(c) 阅读全文
摘要:
1、 > a <- c(3,NA,NA,4,1,5) > b <- c(NA,4,6,2,4,9) > c <- data.frame(a,b) > c a b 1 3 NA 2 NA 4 3 NA 6 4 4 2 5 1 4 6 5 9 > c[is.na(c)] <- 0 > c a b 1 3 阅读全文