Remove column values with NA in R -
i have data frame, called gen, represented below
b c d e 1 na 4.35 35.3 3.36 4.87 2 45.2 .463 34.3 na 34.4 3 na 34.5 35.6 .457 46.3 i remove columns there na's. (i know na.omit rows, can't seem find 1 columns). final result read:
b c e 1 4.35 35.3 4.87 2 .463 34.3 34.4 3 34.5 35.6 46.3 thanks!
gen <- gen[sapply(gen, function(x) all(!is.na(x)))]
Comments
Post a Comment