[R] renaming factors *efficiently*

Dimitris Rizopoulos d.rizopoulos at erasmusmc.nl
Tue Apr 13 16:30:51 CEST 2010


maybe ?abbreviate() could help.


Best,
Dimitris


On 4/13/2010 4:18 PM, Federico Calboli wrote:
> Hi All,
>
> I have a data frame where a couple of columns are factors, with long and complex names. Everything works ok --in R, but I need to export the data so it can be used on a dumber program (one with a three letters name starting with S...). I know that those complex factor names are causing problems reading the data in from acsv file, so I was thinking of renaming the factors. Problem is, I have 173 and 690 factors respectively, so I'd appreciate any advice on how to do it *efficiently*
>
> TIA,
>
> Federico
>
>
> --
> Federico C. F. Calboli
> Department of Epidemiology and Biostatistics
> Imperial College, St. Mary's Campus
> Norfolk Place, London W2 1PG
>
> Tel +44 (0)20 75941602   Fax +44 (0)20 75943193
>
> f.calboli [.a.t] imperial.ac.uk
> f.calboli [.a.t] gmail.com
>
> ______________________________________________
> 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.
>

-- 
Dimitris Rizopoulos
Assistant Professor
Department of Biostatistics
Erasmus University Medical Center

Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands
Tel: +31/(0)10/7043478
Fax: +31/(0)10/7043014



More information about the R-help mailing list