[R] R beginner - how to apply function to more than one matrix / data.array / ...

Gabor Csardi csardi at rmki.kfki.hu
Wed Apr 9 17:57:49 CEST 2008


Yes, it is exactly 'apply', and its friends. E.g. you can collect the 
objects into a list and then do 

sapply(mylist, is.matrix)

G.

On Wed, Apr 09, 2008 at 11:52:08AM -0400, Mon Mag wrote:
> I would like to apply a simple function, like
> is.matrix
> to more than one data.frame
> How can I call on more than one data.frame? (are there any wildcards, etc?)
> 
> I am a true beginner and have tried to look this up in help files, but
> cannot figure it out.
> 
> Thank you.
> 
> 	[[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.

-- 
Csardi Gabor <csardi at rmki.kfki.hu>    UNIL DGM



More information about the R-help mailing list