R_カテゴリを融合する
faraway, chapter 5, p.98
library(faraway)
# p.98
data(nes96)
head(nes96)
sPID <- nes96$PID
levels(sPID)
# [1] "strDem" "weakDem" "indDem" "indind" "indRep"
"weakRep" "strRep"
levels(sPID) <- c("Democrat", "Democrat", "Independent",
"Independent", "Independent", "Republican", "Republican")
Link: R_old_tips2(2310d)
Rの備忘録(4346d)
日録2008年_2月(6105d)
Last-modified: 2008-02-26 (火) 13:46:10 (6469d)