Hello S-users,
when creating factors is it possible to merge levels of a character
variable as the factor is created? In other words can the following be
done in one operation.
ttt <- factor(ttt.char, levels = c("N", "O", "S")
ttt <- merge.levels(ttt, k = list(" Non" = "N",
" Oui" = c("O", "S")))
Thanks,
Gérald Jean
Analyste-conseil (statistiques), Actuariat
télephone : (418) 835-4900 poste (7639)
télecopieur : (418) 835-6657
courrier électronique: gerald.jean@spgdag.ca
"In God we trust all others must bring data" W. Edwards Deming
|