Skip to content

Instantly share code, notes, and snippets.

@peterdalle
Last active April 24, 2022 14:00
Show Gist options
  • Save peterdalle/7fcb79decbf02ecd5af3f64339743267 to your computer and use it in GitHub Desktop.
Save peterdalle/7fcb79decbf02ecd5af3f64339743267 to your computer and use it in GitHub Desktop.
Install my commonly used R packages
favorite_packages <- c(
# Package development
"devtools", "Rcpp", "roxygen2", "testthat", "covr",
# Handle data
"rio", "tidyverse", "broom", "lubridate", "stringr",
# Database
"RMySQL",
# Modelling, machine learning
"lme4", "lavaan", "ggeffects", "margins", "topicmodels", "paramtest", "keras", "caret",
"equatiomatic", "tidymodels",
# Plotting SEM/lavaan
"lavaanPlot", "tidySEM", "semPlot",
# Text analysis
"quanteda", "quanteda.textmodels", "quanteda.textplots", "quanteda.textstats", "quanteda.corpora",
# Modelling and graphs
"directlabels", "ggExtra", "ggrepel", "ggridges", "ggraph", "ggdag",
"ggstatsplot", "sjlabelled", "sjPlot", "gganimate",
"DiagrammeR", "DiagrammeRsvg", "rsvg", "VennDiagram", "ggalluvial",
"geomtextpath",
# Templating, article formats
"bookdown", "rmarkdown", "rticles",
# Create tables, summarize data/models
"gtsummary", "summarytools", "codebook", "gt", "kable", "xtable",
"furniture", "arsenal", "jtools", "modelsummary",
# Simulations
"simstudy", "faux",
# Specification curve analysis
"specr",
# Meta-analysis and effect size estimation
"compute.es", "effects", "effsize", "esc", "metafor", "metacart",
# Misc frequentist
"psych", "pwr", "statcheck", "sjstats",
# Misc Bayesian
"BayesFactor",
# API: Wikipedia, Google Trends
"pageviews", "gtrendsR"
)
install.packages(unique(favorite_packages), Ncpus=8)
# Swedish related.
install.packages(c("pxweb")) # SCB (and others using PX-Web)
devtools::install_github('reinholdsson/swemaps') # Maps of Sweden, by municipality (kommun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment