The reason this doesn't work is because R thinks that in the command as.character(c(first,second)) that first and second are variables that exist within the working environment. Since they don't (I assume), R doesn't know what to do with the command. Using the quotes indicates to R that you're specifying a character string type, instead of calling a variable.
As other have said before, if you don't want to type in quotes, you could just read in a text file in the methods they describe. -- View this message in context: http://r.789695.n4.nabble.com/creating-character-vector-tp3353447p3354199.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.