シリーズ: R
r
53 行
· 更新日 2026-02-03
install-packages.R
R/install-packages.R
# R Package Installation Script
# This script installs all required packages for the R training course
# List of required packages
required_packages <- c(
# Data manipulation
"dplyr",
"tidyr",
"readr",
"readxl",
"openxlsx",
# Visualization
"ggplot2",
"plotly",
"corrplot",
"RColorBrewer",
# Statistics and modeling
"car",
"lmtest",
"MASS",
"multcomp",
"nortest",
"effects",
# Reporting
"knitr",
"rmarkdown",
"kableExtra",
# Additional utilities
"here"
)
# Check and install packages
install_if_missing <- function(pkg) {
if (!require(pkg, character.only = TRUE)) {
install.packages(pkg, dependencies = TRUE)
library(pkg, character.only = TRUE)
}
}
# Install all packages
cat("Installing required packages...\n")
for (pkg in required_packages) {
cat("Checking", pkg, "...\n")
install_if_missing(pkg)
}
cat("\n✅ All packages installed successfully!\n")
cat("You're ready to start the R training course.\n")
関連記事
R
r
更新日 2026-02-03
Fractional_Logit.r
Fractional_Logit.r — r source code from the R learning materials (R/Fractional_Logit.r).
記事を読む →
R
r
更新日 2026-02-03
Fractional_Logit_PCA.r
Fractional_Logit_PCA.r — r source code from the R learning materials (R/Fractional_Logit_PCA.r).
記事を読む →
R
r
更新日 2026-02-03
01-probability-distributions.R
01-probability-distributions.R — r source code from the R learning materials (R/advanced/01-probability-distributions.R).
記事を読む →
R
r
更新日 2026-02-03
02-hypothesis-testing.R
02-hypothesis-testing.R — r source code from the R learning materials (R/advanced/02-hypothesis-testing.R).
記事を読む →
R
r
更新日 2026-02-03
03-linear-regression.R
03-linear-regression.R — r source code from the R learning materials (R/advanced/03-linear-regression.R).
記事を読む →
R
r
更新日 2026-02-03
04-advanced-anova.R
04-advanced-anova.R — r source code from the R learning materials (R/advanced/04-advanced-anova.R).
記事を読む →