Skip to content
Prev 206284 / 398500 Next

Odp: Better way than an ifelse statement?

Hi

r-help-bounces at r-project.org napsal dne 14.01.2010 08:05:14:
One way is with factor

as.numeric(as.character(factor(example$X2, labels=c(-3, -1,1,3))))

Regards
Petr
http://www.R-project.org/posting-guide.html