[R] mean for vector with NA

2008-08-21 Thread bad2101
Thanks for all the help. I'll do some more reading. Brian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, se

[R] mean for vector with NA

2008-08-21 Thread bad2101
I am trying to find the mean for the elements in the vector Incubation=as.POSIXlt(OnsetTime)-as.POSIXlt(MealTime) where OnsetTime=c(NA,"1940-04-19 00:30","1940-04-19 00:30","1940-04-19 00:30",NA,"1940-04-18 22:30","1940-04-18 22:30","1940-04-19 02:00","1940-04-19 01:00","1940-04-18 23:00",N

[R] Removing

2008-08-20 Thread bad2101
Thanks so much for the help! Brian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducib

[R] Removing

2008-08-20 Thread bad2101
I think I should be clearer. Given the matrix of column vectors Age, Sex, and Ill Age=c(11,52,65,59,13,63,70,40,15,33,65,38,62,10,25,32,62,36,11,33,13,7,64,3,65,59,15,62,37,17,35,15,50,40,35,35,36,57,16,68,54,77,72,58,20,17,62,20,52,9,50,8,35,48,25,11,74,12,44,53,37,24,69,7,17,8,11,17,36,21,60

[R] Removing

2008-08-20 Thread bad2101
I'm trying to remove the elements "No" from the character vector Ill=c("No","Yes","Yes","Yes","No","Yes","Yes","Yes","Yes","Yes","No","No","No","Yes","No","Yes","Yes","Yes","No","Yes","Yes","Yes","No","Yes","No","Yes","Yes","No","Yes","No","Yes","Yes","Yes","No","No","Yes","No","Yes","Yes","Yes",