This is the repository for D-Lab's introductory R-Fundamentals workshop series. Laptop, Internet connection, and Zoom account required.
To install R to use locally on your own machine, follow these instructions:
To prepare ahead of time for attending this workhsop, download the R-Fundamentals workshop materials. To run the lessons from the workshop materials on your laptop:
- Click the green “Code” button above (top-right)
- Select “Download ZIP”
- Find the downloaded .zip file and extract it to some place convenient (i.e., Desktop)
- Open these materials in R Studio from the location you extracted the files
(Optionally) If you are a Git user, simply clone this repository by opening a terminal and typing:
git clone [email protected]:dlab-berkeley/R-Fundamentals.git
You can also access RStudio through your browser on UC Berkeley's DataHub by clicking this link. Datahub is a great option if you aren't able to install R and RStudio locally. CalNet ID credentials required.
There are four code files in this repository that we will walk through. The following topics will be covered:
Part1.R - Introduction to R, navigating RStudio, variable assignment, data types and coercion, data structures
Part2.R - Import, subset, and merge data; identify missing data
Part3.R - Research design, data summarization and visualization, statistical testing
Part4.R - For-loops, custom functions, basic automation
Open the file "Part1.R" to begin. Place your cursor on a line of runnable code (lines without hashtags preceding them) and click the "Run" button or press Ctrl + Enter (PC) or command + Enter (Mac) to run a line of code. The output will appear in the "Console" section of RStudio.
D-Lab works with Berkeley faculty, research staff, and students to advance data-intensive social science and humanities research. Our goal at D-Lab is to provide practical training, staff support, resources, and space to enable you to use R for your own research applications. Our services cater to all skill levels and no programming, statistical, or computer science backgrounds are necessary. We offer these services in the form of workshops such as R Fundamentals, one-to-one consulting, and working groups that cover a variety of research topics, digital tools, and programming languages.
Visit the D-Lab homepage to learn more about us. View our calendar for upcoming events, and also learn about how to utilize our consulting and data services.
- Fast-R
- R Data Wrangling
- R Graphics with ggplot2
- R Functional Programming
- Project Management in R
- Geospatial Fundamentals in R with sf
- Census Data in R
- Advanced Data Wrangling in R
- Introduction to Machine Learning in R
- Unsupervised Learning in R
- R Machine Learning with tidymodels
- Introduction to Deep Learning in R
- Fairness and Bias in Machine Learning
- R Package Development
- R Markdown: The Definitive Guide
- The tidyverse style guide
- Tidy Text Mining
- Regular expressions with stringr
- Quick Intro to Parallel Computing in R
- Software Carpentry
- Bookdown Featured Books
- Kearns GJ. 2010. Introduction to Probability and Statistics in R
- Wickham H. 2014. Advanced R
- R for Data Science
- Lander J. 2013. R for everyone: Advanced analytics and graphics
- Matloff N. 2011. The art of R programming: A tour of statistical software design
- Brunsdon C, Comber L. 2015. An Introduction to R for Spatial Analysis and Mapping
- James G, Witten D, Hastie T, Tibshirani R. 2013. An Introduction to Statistical Learning: With Applications in R, 7th edition
- Department of Statistics
- Department of Mathematics
- Biostatistics
- Data Science
- School of Information
- data8
- EECS
Don't know where to start researching classes? Look up some of these to see if they pique your interest: Data 8, CS61A, CS61B, CS 61C, CS70/Math 55, CS 188, CS 189, Math 53, Math 54, Math 110, Stat 28, Stat 20/21, Stat 133, Stat 134/140, Data 100.
- Evan Muzzall
- Aniket Kesari
- Jae Yeon Kim
- Sam Abdel-Ghaffar
- Guadalupe Tuñón
- Shinhye Choi
- Patty Frontiera
- Rochelle Terman
- Dillon Niederhut