[R] creating character vector

nblarson nblarson at gmail.com
Mon Mar 14 16:50:22 CET 2011


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.



More information about the R-help mailing list