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

2009-07-13 Thread chipmaney
I have a function (see below). This function has one object, ID. If I run the loops by themselves using a character value (ie,VFFF1-7) instead of the function object, 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

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

2009-07-13 Thread jim holtman
Your basic problem is that you are trying to change the value of a global object (TotalCover.df) from within a function. A better approach is to pass in the object that you are changing and then return it as the value of the function. You can then assign it back to the original object if you