[R] Probs with paste

From: EVANS David-William <david-william.evans_at_sncf.fr>
Date: Mon, 09 Jun 2008 16:44:03 +0200


Hello all,  

After some months doing ok with R, I am embarrassed that I have to make this my first posting to the help list. I am trying to run the following (actually in a loop but shortened for the post):  

risk.factors <- c("file$A", "file$B", "file$C", "file$D", "file$E")

    table(paste(risk.factors[1]))  

but run into problems with the table (paste...) line as I get the following output:  

> table(paste(risk.factors[1]))
 

file$A

             1  

I think it's a problem with paste including " " around the file name but cannot get around it. Apologies for the simple nature of this question and thanks to anyone who can take a moment to help.  

David.  

        [[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. Received on Mon 09 Jun 2008 - 18:21:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 10 Jun 2008 - 13:30:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive