Introduction to R for Public Health Researchers
Welcome to Introduction to R for Public Health Researchers!
This course is for students who have little to no familiarity with the R programming language and want to learn more about how to use R to import, wrangle, visualize, and analyze data.
The course will provide students with “hands-on” training for analyzing data with the R programming language for statistical computing, a popular open-source solution for data analysis and visualization.
Carrie Wright: cwrigh60 at jhu.edu
Ava Hoffman: ava.hoffman at jhu.edu
Candace Savonen: csavone1 at jhu.edu
All assignments are due Wednesday, Jan 26, 2022 at 11:59pm EST.
Note: only people taking the course for credit must turn in the assignments. However, we will evaluate all submitted assignments in case others would like feedback on their work.
Submit each assignment to the designated Drop Box on CoursePlus.
You should complete the following:
This project should entail:
You may use one of these public datasets, a different public dataset, or your own data for the project. If using your own dataset, be sure any sensitive information is protected.
Example projects can be found with the source code: Rmd, and the output html here.
See the guidelines/instructions for final projects.
We would like to create an open, safe, welcoming, diverse, inclusive, intellectually stimulating, and hopefully fun class experience.
We strive to be a space in which individual differences are respected, so that each individual can reach their fullest potential.
This applies to emails, surveys, Slack, Zoom, office hours, meetings with other students, instructors, or TAs.
Please reach out to a TA or instructor if you witness or experience a violation of the class guidelines or other JHU codes of conduct.
The University has developed avenues for reporting and for seeking help including:
● JHU Sexual Assault Helpline, 410-516-7333 (confidential) ● Campus Safety and Security, 410-516-7777 ● University Sexual Assault Response and Prevention website ● Johns Hopkins Compliance Hotline, 844-SPEAK2US (844-733-2528) ● JHU Office of Institutional Equity 410-516-8075 (nonconfidential) ● Johns Hopkins Student Assistance Program (JHSAP), 443-287-7000 ● University Health Services - Mental Health (UHS-MS), 410-955-1892 ● The Faculty and Staff Assistance Program (FASAP), 443-997-7000
We have an R
package called jhur
that will make sure all the packages are installed.
install.packages("remotes")
remotes::install_github("muschellij2/jhur")
All the data used that are not specifically to be downloaded from the web are located in this zip file, but we will show you how to read data from the internet as well.
In recognition of Martin Luther King Jr. Day, there will be no class on Monday January 17th 2022. There is an assignment due before class to install software and we recommend completing HW 1 (uploading a screenshot showing that you finished the Dataquest module indicated below) before class, but all other assignments will be due January 26th. You are welcome to turn assignments in earlier if you wish.
Need help?
Animations of join functions: full-join()
inner_join()
left-join()
right-join()
PC users who want to see how to move files around (especially from downloads), check out this video: https://youtu.be/we6vwB7DsNU
Mac users who want to see how to move files around (especially from downloads), check out this video: https://www.youtube.com/watch?v=Ao9e0cDzMrE
Want more?
Tidyverse Skills for Data Science Book
(more about the tidyverse, some modeling, and machine learning)
Tidyverse Skills for Data Science Course
(same content with quizzes, can get certificate with $)
R for Data Science
(great general information)
Open Case Studies
(resource for specific public health cases with statistical implementation and interpretation)
Dataquest
(general interactive resource)
Quick R Guide
(nice free general resource)
Building up a ggplot2
figure
(guide to making plots)
Interested in Reproducibility?
Check out Candace’s courses:
R for Stata, SPSS, and SAS files
Day | Link to Video |
---|---|
RStudio and Data Classes | https://www.youtube.com/watch?v=vyIsDnsq5jY |
Subsetting Data | https://youtu.be/mT8lSagYbjM |
Data Summarization Part 1 | https://www.youtube.com/watch?v=SZYpzt9zy0g |
Data Classes | https://www.youtube.com/watch?v=82zSA1N0mnA |
Data Cleaning | https://youtu.be/G3V2YPaQN34 |
Data Manipulation | https://youtu.be/43MPdw5bf4o |
Statistics 1 | https://www.youtube.com/watch?v=Jr4ljyzrr4U |
Statistics 2 | https://youtu.be/ub2BSbK9lMM |
Day | Link to Video |
---|---|
Day 1 | https://youtu.be/Xi-wsACc7p0 |
Day 2 | https://youtu.be/u1FQt9Hr8iw |
Day 3 | https://youtu.be/woc7AGJTzZw |
Day 4 | https://youtu.be/RZ7eVIMPIes |
Day 5 | https://youtu.be/e8cFV8wluC0 |
Feel free to submit typos/errors/etc via the github repository associated with the class: https://github.com/jhudsl/intro_to_r_class
This page was last updated on 2022-01-20.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.