[R] I want to send the vector a into the Object A.......

Berend Hasselman bhh at xs4all.nl
Tue Sep 18 16:43:36 CEST 2012


On 18-09-2012, at 11:08, Sri krishna Devarayalu Balanagu wrote:

> Thank you very much
> I am having one more doubt. Please clarify it, if possible.
> 
> x = c("a", "b", "c", "d", "e")
> suppose I want to create an object named "a.Arms" with the elements 1,2,3. I am trying with following code. But getting error
> 
> paste(x[1], ".Arms", sep="") <- c(1,2,3)
> Error: could not find function "paste<-"
> Can you pls help

assign(paste(x[1], ".Arms", sep=""), c(1,2,3))

Berend




More information about the R-help mailing list