On Tue, May 22, 2012 at 11:22 AM, Vincy Pyne <vincy_p...@yahoo.ca> wrote: > Thanks a lot for pointing out such a silly mistake from my side. I was simply > wondering how come I am not getting such a simple mean. > To avoid such mistakes it would help to first store your data in a vector.
> x<-c(16,18) > mean(x) [1] 17 If you did otherwise: > x<- 16,18 Error: unexpected ',' in "x<- 16," then R would complain. Liviu ______________________________________________ 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, reproducible code.