Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ccs-amsterdam/r-course-material
A collection of R tutorials
https://github.com/ccs-amsterdam/r-course-material
Last synced: about 2 months ago
JSON representation
A collection of R tutorials
- Host: GitHub
- URL: https://github.com/ccs-amsterdam/r-course-material
- Owner: ccs-amsterdam
- License: other
- Created: 2018-09-03T12:23:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-04T14:41:27.000Z (6 months ago)
- Last Synced: 2024-08-01T01:27:34.435Z (4 months ago)
- Language: HTML
- Size: 57.5 MB
- Stars: 175
- Watchers: 13
- Forks: 81
- Open Issues: 3
-
Metadata Files:
- Readme: readme.html
- License: LICENSE.md
Awesome Lists containing this project
- awesome-teaching-about-networks - R Course Material for Communication Science
- awesome-computational-social-science - R Course Material for Communication Science
README
readme
h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
code{white-space: pre;}
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
pre code {
padding: 0;
}.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
border: 1px solid #ddd;
border-radius: 4px;
}.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}.tabset-dropdown > .nav-tabs > li.active {
display: block;
}.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}.tabset-dropdown > .nav-tabs > li {
display: none;
}R course material
This page contains a collection of R tutorials, developed at the Vrije Universiteit Amsterdam for Communication Science courses that use R.
The goal is to organize relevant material into modular components, for more efficient design and maintenance of material, that can be used across courses, and that are accessible to students during and after their studies.
Below we list the relevant handouts/tutorials. Each links to the md file, see the Rmd file with the same name for the source code of the tutorials.
Data mangling in the tidyverse
This is a set of tutorials designed to teach using the tidyverse functions for data cleaning, reshaping, visualizing etc. The chapter numbers are relevant chapters from the excellent (and freely available) book “R for Data Scientists” (R4DS)
Handout
Video Tutorial
R4DS ch.
Core packages / functionsFun with R
Fun with R
3
tidyverse,ggplot2,igraphR Basics
Intro to R
4
(base R functions)Transforming Data
Importing and Cleaning
5
dplyr: filter, select, arrange, mutateSummarizing Data
Grouping and Summarizing
5
dplyr: group_by, summarizeVisualizing Data
ggplot 1
7
ggplot2Reshaping data
Reshaping
12
tidyr: spread, gatherCombining (merging) Data
Joining
13
dplyr: inner_join, left_join, etc.14
readr: str_detect, str_extract etc., iconvStatistical Analysis
This is a set of tutorials designed to teach basic statistical modeling and analysis. The first tutorial includes examples for standard regression analysis as well as analysis of variance. Later tutorials exemplify the use of more advanced statistical modelling approaches including the generalized linear model and multilevel models.
Tutorial
Video tutorial
Core packages / functionsBasic statistics
Basic stats
stats: lm, aov, t.testAdvanced statistics overview
see GLM and Multilevel
stats: glm, lme4: lmer, glmerGeneralized linear models
GLM (on family argument)
stats: glm, family, sjPlot: tab_model, plot_modelMultilevel Models
Multilevel
lme4: lmer, glmer, sjPlot: tab_model, plot_modelTest theory and factor analysis
The following tutorials can be used to teach basics of test theory and particularly confirmatory and exploratory factor analysis approaches.
Tutorial
Video tutorial
Core packages / functionsTest Theory and Confirmatory Factor Analysis
CFA in R
psych: describe, mardia; lavaan: cfa, fitMeasures, modindices; semTools: reliabilityExploratory Factor Analysis
EFA in R
psych: describe, mardia, fa.parallel, nfactors, fa, fa.diagram, omegaText analysis
For a general introduction to text analysis (in R), see these videos on preprocessing and different analysis approaches
Tutorial
Video tutorial
Core packages / functionsText analysis
corpus stats
quantedaLexical sentiment analysis
dictionaries
quanteda, corpustoolsLDA Topic Modeling
Video series, Tutorial demo
topicmodels,quantedaStructural Topic Modeling
Variants of Topic Models; Structural Topic Models
stm, quantedaNLP Preprocessing with Spacy(r)
spacyr, quanteda (see also spacy itself)
Supervised machine learning for text classification
Supervised Machine Learning
caretData collection
Tutorial
Video tutorial
Core packages / functionstidyverse, jsonlite
Note on installing packages
In general, most R packages can be installed without any issues. However, there are some exceptions that you need to know about. For quanteda (that we use in the text analysis tutorials), your computer needs certain software that is not always installed, as mentioned on the quanteda website. You can either install this software, but we rather recommend using R version 4.0.0 (or higher) where this is no longer required. To see your current R version, enter
version
in your R console. To update, visit the R website (Windows, Mac).When running
install.packages()
You sometimes get the message that There is a binary version available but the source version is later (we’re mainly seen this on Mac). You then get the question whether you want to install from sources the package which needs compilation (Yes/no) . To answer this question, you have to type “yes” or “no” in your R console. Most often, you’ll want to say no. Simply put, R tells you that it has a new version of a package, but if you want to use it your computer will need to build it. The problem is that this requires some development software that you might not have installed. If you say no, you’ll install an older version that has already been build for you. In rare cases, installing from source is the only way, in which case you’ll have to install the software that R refers to.
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});$(document).ready(function () {
window.buildTabsets("TOC");
});$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open');
});
});(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();