Re: [R] Function won't permanently assign values to a vector

2011-08-28 Thread Daniel Malter
It will greatly help if you provide a self-contained example, as requested in the posting guide. Most of the times this will in fact lead to you figuring out your problem yourself, but if not it will greatly enhance your chances that we can help you in a meaningful, unambiguous way. Best, Daniel

Re: [R] Function won't permanently assign values to a vector

2011-08-28 Thread R. Michael Weylandt
Two things: It's just a guess as to what your problem is, but functions in R don't usually act on the object that is passed to them, but rather a copy thereof: if you want to keep the values calculated within the function, that's usually done with an assignment statement combined with the function