Another R-ish way of modifying an object with a function is to use
'replacement functions' (there must be other names, I'm not sure
what the standard is) that let you use syntax like
someProperty(myData, ...) - newProperty
To do this define a function called `someProperty-` whose last
Hi
Maybe others can help you but here is my comment. I already use R for many
years and never used such construction. Objects in global environment shall not
be modified by functions it is a bad practice. Imagine you have some data frame
you prepared and controlled in many steps and use some
It is strongly discouraged in R to have functions that change data values
in the global workspace (or any location other than their local
environment).
The usual procedure in R is to have your function return a modified version
of the object and the user then decides what to do with it. They can
Dear Listers,
can anyone help me, please.
Since several days i try to figure out, how to assign values, vectors,
functions etc to variables with dynamically generated names inside of
functions.
Sometimes I succeed, but the success is rather arbitrary, it seems. up to
now i don't fully
4 matches
Mail list logo