Data Manipulation in R

From Augix' Wiki

Jump to: navigation, search
DF <- data.frame(x = c(1, 2, 3), y = c(0, 10, NA))
DF
## remove the lines with NA
na.omit(DF)
## remove the lines with 0
DF[DF == 0] = NA
na.omit(DF)
Personal tools