[R] Creating data using multiple for loops
Jim Lemon
drj|m|emon @end|ng |rom gm@||@com
Mon Aug 19 23:09:59 CEST 2019
Hi Greg,
I replied because I thought the name of the "expand.grid" function can
be puzzling. While "expand.grid" is a very elegant and useful
function, it is much easier to see what is happening with explicit
loops rather than loops buried deep inside "expand.grid". Also note
Bill's comment about producing repeats by converting numeric values to
character without the leading zeros. You can also use "formatC" to
deal with that problem.
Jim
On Tue, Aug 20, 2019 at 12:05 AM <g.eastham.gilbert using gmail.com> wrote:
>
> Jim,
>
> Thank you very much for your help. I have "unpacked" the code and have a rudimentary understanding of what you did. Thanks again. However, I have no idea to what Bert is referring. Could you help me understand his suggestion? Thanks.
>
> -Greg
More information about the R-help
mailing list