R/R Learning materials
빅데이터 분석도구 R in Action - Errata3
거인과난쟁이
2022. 7. 2. 15:32
p. 58 abline(lm(mpg~wt) --> abline(lm(mpg~wt))
p.59 abline(lm(mpg~wt) --> abline(lm(mpg~wt))
p.70 lyt (선타입) --> lty (선타입)
p.117 표 5.7의 함수를 --> 표 5.7의 함수들
p.412 15.2.3절에서 --> 15.3.3절에서
p.127~128 프로그래밍 5.8 스크립트 일부가 한글 번역서 편집과정에서 누락되었습니다.
if (parametric) {
center <- mean(x); spread <- sd(x)
} else {
center <- median(x); spread <- mad(x)
}
if (print & parametric) {
cat("Mean=", center, "\n", "SD=", spread, "\n")
} else if (print & !parametric) {
cat("Median=", center, "\n", "MAD=", spread, "\n")
}
result <- list(center=center, spread=spread)
return(result)
}
set.seed(1234)
x = rnorm(500)
y = mystats(x)
y
mystats <- function(x, parametric=TRUE, print=FALSE) {
p. 576 Rcmd INSTALL build --> Rcmd INSTALL -build