hello, yes I will try colmeans, I thought it will not get rid of th NA's....
But thank you for the advice! Andre 2014-04-14 13:25 GMT+01:00 David McPearson [via R] < ml-node+s789695n4688731...@n4.nabble.com>: > On Sun, 13 Apr 2014 05:01:40 -0700 (PDT) "[hidden > email]<http://user/SendEmail.jtp?type=node&node=4688731&i=0>" > > <[hidden email] <http://user/SendEmail.jtp?type=node&node=4688731&i=1>> > wrote > > > Thank you very much!!!!!! > > > .. > .. > > *De :* arun kirshna [via R] > > *Envoyé :* 13 avril 2014 11:23 > > *à :* [hidden email]<http://user/SendEmail.jtp?type=node&node=4688731&i=2> > > *Objet :* Re: mean calculations from a dframe column > > > > Hi André, > > > > Your codes were missing in some information. If your code looks like > this: > .. > .. > > Mean <- apply(a, 2, mean, na.rm = TRUE) > .. > .. > .. > > Andre, > > Just for future reference, have a look at > ?colMeans > "These functions are equivalent to use of apply with FUN = mean or FUN = > sum > with appropriate margins, but are a lot faster." > > Cheers, > D. > > ____________________________________________________________ > South Africas premier free email service - www.webmail.co.za > > Ensure Quality Health Care For All http://www.anc.org.za/2014/manifesto/ > > ______________________________________________ > [hidden email] <http://user/SendEmail.jtp?type=node&node=4688731&i=3>mailing > list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > > > ------------------------------ > If you reply to this email, your message will be added to the > discussion below: > > http://r.789695.n4.nabble.com/mean-calculations-from-a-dframe-column-tp4688674p4688731.html > To unsubscribe from mean calculations from a dframe column, click > here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4688674&code=YW5kcmUuemFjaGFyaWFAZ21haWwuY29tfDQ2ODg2NzR8LTE5ODcxMTY1OTA=> > . > NAML<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > ----- André -- View this message in context: http://r.789695.n4.nabble.com/mean-calculations-from-a-dframe-column-tp4688674p4688734.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]
______________________________________________ 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.