I created variables automatically like this way

for(i in 1:5){
        nam <- paste("a",i,sep="")
        assign(nam,1:i)
}

and then, i want to insert a new data into "a2" variable. so, i did next
sentence

paste("a",2,sep="") <- 4

so, i got this error message

Error in get(paste("a", 2, sep = ""))[1] <- 4 : 
  target of assignment expands to non-language object

anyone knows abou this error message and tell me how to solve thie problem,
please......
-- 
View this message in context: 
http://n4.nabble.com/somebody-help-me-about-this-error-message-tp1571700p1571700.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to