[R] Convert variable to STring

John Kane jrkrideau at inbox.com
Mon Jul 30 14:29:14 CEST 2012

Can you give us an example of what you mean by the functions listed below.

Otherwise something like this seems to work
xx <-  1 :4
x1  <-  as.character(xx)

mat  <-  matrix(1:12, nrow=3)

John Kane
Kingston ON Canada

> -----Original Message-----
> From: alaios at yahoo.com
> Sent: Mon, 30 Jul 2012 03:47:45 -0700 (PDT)
> To: r-help at r-project.org
> 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?
> Regards
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at 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.

GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails

More information about the R-help mailing list