Re: [R] modify a data.frame within a function

2007-12-15 Thread Mark Wardle
You need to read about scope. Try using return() from within your function to return the modified data frame to the caller. Best wishes, Mark On 15/12/2007, Yuval Sapir <[EMAIL PROTECTED]> wrote: > Hello all, > I'm trying to modify a single column of a data frame to remove randomly half > of

[R] modify a data.frame within a function

2007-12-15 Thread Yuval Sapir
Hello all, I'm trying to modify a single column of a data frame to remove randomly half of the values. I want to do it within a function, but can not assign the modified column back into the data frame. It was easy and successful without a function, so I suspect the problem is the call of the s