Skip to content
Prev 285258 / 398502 Next

save objects of own function to workspace

On Feb 14, 2012, at 9:20 AM, Marion Wenty wrote:

            
Why take two steps to change that column name?
You just overwrote an object that you created earklier but have not  
done anything with in the meantime.
Then just assign it:

mz_result <- s_elternmz()

As you have noticed, assignment inside a function is not a durable  
event. The function returns the value of either its first encounter  
with return() or the value
of hte last assignment (but not the name to which that object was  
assigned.) Welcome to R's version of functional programming.
David Winsemius, MD
West Hartford, CT