Re: [R] ls() pattern

From: <Richard.Cotton_at_hsl.gov.uk>
Date: Thu, 13 Dec 2007 15:51:30 +0000


> Thank you very much for your reply.I came across with another
> problem for assigning the variables.
> in order to achieve cbcname1 = 0.1, I would use sth like:
>
> paste("cbc","name1","=",function(),sep="")
>
> But it seems incorrect. Any advice?

This sounds like a different problem. Do you mean that you want to automatically generate variable names and assign something to the resultant strings?

May I suggest you read the FAQ on R, 7.21 "How can I turn a string into a variable?"

Regards,
Richie.

Mathematical Sciences Unit
HSL



ATTENTION: This message contains privileged and confidential inform...{{dropped:20}}

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 13 Dec 2007 - 16:31:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 13 Dec 2007 - 17:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.