[R] Convert variable to STring

arun smartpink111 at yahoo.com
Mon Jul 30 14:04:20 CEST 2012


Not sure whether this is what you need.

> toString(colnames(mymatrix))
#[1] "function1, function2, function3"


----- Original Message -----
From: Alaios <alaios at yahoo.com>
To: R help <R-help at r-project.org>
Sent: Monday, July 30, 2012 6:47 AM
Subject: [R] Convert variable to STring

Dear all,
I have a variable that I would like also to use it as a string. The reasons is that I want to collect results from different function to one table.. So when I use the
 colnames(mymatrix) <-c(function1.function2,function3)
the function1, function2, function3 to be "converted" to simple strings so as

 colnames(mymatrix) <-c("function1","function2","function3")

Could you please help me understand how I can do that in R?


    [[alternative HTML version deleted]]

R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list