/intro_to_r

Introduction to R and RStudio for working with census data

Primary LanguageHTML

Introduction to R and RStudio

This repository contains materials relevant to the session “Introduction and exposure to R and RStudio” presented at the Workshop on Harnessing Opportunities Towards Resilient Future Through Census Data, Putrajaya, Malaysia, July 27, 2022.

To use the example code in this repository, we recommend opening RStudio and using the menu at the top of the window to navigate to File > New Project > Version Control > Git.

In the “Repository URL” field, paste the URL for this repository (https://github.com/ipums/intro_to_r).

Note the location specified in the “Create project as subdirectory of:” field, and change it as necessary.

Next, click the Create Project button. This will create a new folder for your project, download all the files in this repository into that folder, and open the project in RStudio.

From there, you can open the files “example_script.R” or “example_script.Rmd” to test out example R code related to the presentation.

If you don’t want to use RStudio to download the files, you can also download them as a ZIP archive by clicking the green “Code” button above and choosing “Download ZIP”.

The main files of interest to workshop participants are “example_script.R” and “example_script.Rmd”. If you want to see the R source code for the presentation itself, you can find that in “intro_to_r_slides.Rmd”. To see the result of rendering “example_script.Rmd” to HTML, visit https://tech.popdata.org/intro_to_r/.