[R] How to unquote string in R

Erik Iverson eriki at ccbr.umn.edu
Wed Nov 3 18:28:38 CET 2010



lord12 wrote:
> 
> s= "Hey"
> a = "Hello"
> table = rbind(s,a)
> write.table(table,paste("blah",".PROPERTIES",sep = ""),row.names =
> FALSE,col.names = FALSE)
> 
> In my table, how do I output only the words and not the words with the
> quotations?
> 

You read the help page for the function you're using :).

 From ?write.table:

    quote: a logical value (‘TRUE’ or ‘FALSE’) or a numeric vector.  If
           ‘TRUE’, any character or factor columns will be surrounded by
           double quotes.  If a numeric vector, its elements are taken
           as the indices of columns to quote.  In both cases, row and
           column names are quoted if they are written.  If ‘FALSE’,
           nothing is quoted.



More information about the R-help mailing list