[R] Assignment Week 1

arun smartpink111 at yahoo.com
Wed Jan 15 08:26:02 CET 2014

Hi,May be this helps:
 dat1 <- data.frame(Col1= sample(c(NA,1:10),25,replace=TRUE),Col2=rnorm(25))
subset(dat1,!is.na(Col1)) #subset based on non-missing values of first column
sum(is.na(dat1[,1]))#count missing values.

On Wednesday, January 15, 2014 2:14 AM, Dorcas Nduati <dnduati at gmail.com> wrote:

I don't want to cheat for Assignment Week 1 I calculated the answers using
microsoft excel.

Please help me with extracting data, counting missing values in R software
will really be grateful. Don't want to be a liar.

Dorcas Nduati
PHPT Dept.
Room 111

Office:0202453621 Ext 27107

    [[alternative HTML version deleted]]

R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list