Re: [R] Help me get this function to work...

2009-07-13 Thread Duncan Murdoch
On 7/13/2009 3:21 PM, Mark Knecht wrote: On Mon, Jul 13, 2009 at 12:08 PM, David Winsemius 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. David Winsemius, MD Heritage Laboratories West Hartfo

Re: [R] Help me get this function to work...

2009-07-13 Thread Bert Gunter
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) --- Completely Un. Consult the R Docs, especially the R Language Definition manual, for answers

Re: [R] Help me get this function to work...

2009-07-13 Thread Mark Knecht
On Mon, Jul 13, 2009 at 12:08 PM, David Winsemius 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. > > > > David Winsemius, MD > Heritage Laboratories > West Hartford, CT > How important it is to

Re: [R] Help me get this function to work...

2009-07-13 Thread David Winsemius
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. On Jul 13, 2009, at 1:23 PM, Chip Maney wrote: I have a function (see below). This function has one object, ID. If I run the loops by itself using a

[R] Help me get this function to work...

2009-07-13 Thread Chip Maney
I have a function (see below). This function has one object, ID. If I run the loops by itself using a character value (ie,"VFFF1-7"), then the loops work fine. However, when I try to insert the character value via the function call, it doesn't work. I don't get an error, but the TotalCover.d