[R] Using assign with mapply

Julio Sergio Santana juliosergio at gmail.com
Thu Dec 19 18:17:06 CET 2013


Greg Snow <538280 <at> gmail.com> writes:

> 
> The take home message that you should be learning from your struggles
> is to "Not Use The 'assign' Function!" and "Do Not Use Global
> Variables Like This".
> 
> R has lists (and environments) that make working with objects that are
> associated with each other much simpler and fits better with the
> functional programming style of R.
> 

Thanks, Greg!

Yours is a very smart solution to the problem I posed. 

By the way, what I'm trying to do is reading from a file a set of user given 
parameters, in two paired columns: parameter-name, value; and then, managing 
these parameters inside my R program. Now I do understand a bit more about 
lists. What about environments? Are they similar to lists, and when, and how 
are they created?

Best regrards,

  -Sergio.



More information about the R-help mailing list