Re: [R] ls() pattern

From: <>
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?"


Mathematical Sciences Unit

ATTENTION: This message contains privileged and confidential inform...{{dropped:20}} mailing list PLEASE do read the posting guide 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 Please read the posting guide before posting to the list.