[R] Help me get this function to work...
Mark Knecht
markknecht at gmail.com
Mon Jul 13 21:21:46 CEST 2009
On Mon, Jul 13, 2009 at 12:08 PM, David Winsemius<dwinsemius at comcast.net> wrote:
> In R a function only returns the last evaluation, so you need to wrap up all
> of the local results into a list at the end of the function.
>
>
<SNIP>
>
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
How important it is to wrap the list in a return statement, ala
return(list(ShrubCover.df, TreeCover.df, TotalCover.df))
or
answer <- list(ShrubCover.df, TreeCover.df, TotalCover.df)
return(answer)
Thanks,
Mark
More information about the R-help
mailing list