[R] ls() pattern

Richard.Cotton at hsl.gov.uk Richard.Cotton at hsl.gov.uk
Thu Dec 13 16:51:30 CET 2007


>   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}}



More information about the R-help mailing list