Ugghh...  Sorry for bothering you all!!


(Yes, I analyzed the data for my ecology M.S. project with R, but I wasted
countless hours committing silly mistakes like this.)


On Thu, Jul 24, 2014 at 4:11 PM, Bert Gunter <gunter.berton@gene.com> wrote:

> ummm.... R is case sensitive! "fun" != "FUN"
>
> (Have you gone through any R tutorials yet? If not, please do so
> before posting further).
>
> Cheers,
> Bert
>
> Bert Gunter
> Genentech Nonclinical Biostatistics
> (650) 467-7374
>
> "Data is not information. Information is not knowledge. And knowledge
> is certainly not wisdom."
> Clifford Stoll
>
>
>
>
> On Thu, Jul 24, 2014 at 10:07 AM, Pfeiffer, Steven <pfeiffss@miamioh.edu>
> wrote:
> > Hello!
> >
> > Does apply() not work with customized functions?  Here is a simple
> example:
> >
> >      AddSeven<-function(n){n+7}
> >      AddSeven(3)
> >        [1] 10
> >      M<-matrix(nrow=2,ncol=2,data=c(1,2,3,4),byrow=TRUE)
> >      M
> >             [,1] [,2]
> >        [1,]    1    2
> >        [2,]    3    4
> >      apply(x=M,margin=c(1,2),fun=AddSeven)
> >        Error in match.fun(FUN) : argument "FUN" is missing, with no
> default
> >
> > Thanks for your help!
> > -Steve Pfeiffer
> >
> >         [[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.
>

	[[alternative HTML version deleted]]

