Re: [R] reference generated var name in loop

2023-05-28 Thread Evan Cooch
Thanks very much - that does the trick. Many good suggestions. On 5/26/2023 12:00 PM, Greg Snow wrote: Using the `assign` function is almost always a sign that you are making things more complicated than is needed. It is better to work directly with lists, which make it much easier to set and

Re: [R] reference generated var name in loop

2023-05-26 Thread Greg Snow
Using the `assign` function is almost always a sign that you are making things more complicated than is needed. It is better to work directly with lists, which make it much easier to set and get names. Your code and description can be done pretty simply using the `lapply function (often easier

[R] reference generated var name in loop

2023-05-26 Thread Evan Cooch
Greetings -- I'm trying to write some code that basically does the following: 1\ user inputs a list of parameter names, and parameter values. 2\ code parses this list, extracting parameter names and values separately 3\ loops over the number of parameters, and for each parameter, generates