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

2011-03-28 Thread Ivan Calandra
Hi, I'm not sure it's the best solution, but I think this should do: levels(small_factor) <- gsub("d_", "", levels(small_factor)) small_factor [1] variable1 variable2 variable3 Levels: variable1 variable2 variable3 HTH, Ivan Le 3/28/2011 16:40, Bodnar Laszlo EB_HU a écrit : small_factor<- fact

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

2011-03-28 Thread Ben Bolker
Bodnar Laszlo EB_HU 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))) _

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

2011-03-28 Thread Bodnar Laszlo EB_HU
Hello, I'd like to ask you something again. 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 Now the thing is that I would like to convert each element of this factorized column. Basically I w