1、subset函数(同时实现对行和列的提取)
a <- 1:8
b <- letters[1:8]
c <- LETTERS[1:8]
d <- data.frame(a,b,c)
d
e <- subset(d,a > 4 & a < 8, select = c(a,b))
e
f <- subset(d,a > 4 | a < 2, select = c(a,c))
f
1、subset函数(同时实现对行和列的提取)
a <- 1:8
b <- letters[1:8]
c <- LETTERS[1:8]
d <- data.frame(a,b,c)
d
e <- subset(d,a > 4 & a < 8, select = c(a,b))
e
f <- subset(d,a > 4 | a < 2, select = c(a,c))
f