paste("a",2,sep="") is simply creating a new character "a2"
Why not just a2 <- 4 ? --- On Sat, 2/27/10, Joseph Lee <seokhyun...@gmail.com> wrote: > From: Joseph Lee <seokhyun...@gmail.com> > Subject: [R] somebody help me about this error message... > To: r-help@r-project.org > Received: Saturday, February 27, 2010, 12:13 AM > > 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. > __________________________________________________________________ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ ______________________________________________ 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.