Re: [R] sapply and median, possible or not ?

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Fri, 07 Nov 2008 09:37:48 -0200

You can provide a example of your data?

On Fri, Nov 7, 2008 at 9:14 AM, Ptit_Bleu <ptit_bleu_at_yahoo.fr> wrote:

>
> Unfortunately, I have the same error message.
> lapply(rowsplit, function(x)mean(x[,sapply(x, is.numeric)])) works but not
> with median.
> Strange, isn't it?
>
> Any other idea?
>
> Thanks in advance,
> Ptit Bleu.
>
>
> Henrique Dallazuanna wrote:
> >
> > Try this:
> >
> > lapply(l, function(x)median(x[,sapply(x, is.numeric)]))
> >
> >
> > --
> > Henrique Dallazuanna
> > Curitiba-Paraná-Brasil
> > 25° 25' 40" S 49° 16' 22" O
> >
> > [[alternative HTML version deleted]]
> >
> >
> > ______________________________________________
> > R-help_at_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.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/sapply-and-median%2C-possible-or-not---tp20378222p20378663.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help_at_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.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]


______________________________________________ R-help_at_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.

Received on Fri 07 Nov 2008 - 11:45:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 07 Nov 2008 - 12:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive