[R] deleting the first two characters in each row of a factorized column

Ben Bolker bbolker at gmail.com
Mon Mar 28 16:47:26 CEST 2011


Bodnar Laszlo EB_HU <Laszlo.Bodnar <at> erstebank.hu> writes:

> I have a database and it has a column which looks like this one here:
> 
> small_factor <- factor(c("d_variable1","d_variable2","d_variable3"))
> small_factor
> 

  small_factor <- factor(gsub("^d_","",as.character(small_factor)))



More information about the R-help mailing list