Mon Mag
2008-Apr-09 15:52 UTC
[R] R beginner - how to apply function to more than one matrix / data.array / ...
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]]
Gabor Csardi
2008-Apr-09 15:57 UTC
[R] R beginner - how to apply function to more than one matrix / data.array / ...
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