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<- factor(c("d_variable1","d_variable2","d_variable3"))
-- Ivan CALANDRA PhD Student University of Hamburg Biozentrum Grindel und Zoologisches Museum Abt. Säugetiere Martin-Luther-King-Platz 3 D-20146 Hamburg, GERMANY +49(0)40 42838 6231 ivan.calan...@uni-hamburg.de ********** http://www.for771.uni-bonn.de http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php ______________________________________________ R-help@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.