Skip to content

arcus/first_steps_in_r_rstudio_exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

First Steps in R and RStudio Exercises

This repository holds exercise and solutions files related to the First Steps in R and RStudio Skills Series offered by Arcus Education.

Here is a breakdown of some of the topics covered in each exercise:

Session 2

  • Source and Visual buttons in the RStudio IDE
  • The green "play" button that executes code chunks in the RStudio IDE
  • Loading the tidyverse package using library
  • Verbose output that can happen from loading packages
  • Loading a library allows you to use its functions
  • Using the read_csv function to ingest a csv file
  • Working with the Environment tab in the RStudio IDE
    • Blue triangle beside data frames
    • Clicking on the names of data frames
  • Good names for objects (variables, columns) in R
  • head, tail, summary as ways to examine an object in R
  • R often has multiple ways to do the same thing
  • Help in R and reading help documentation
  • Rendering a Quarto document

Session 3

  • Using chunk options like warning=FALSE and message=FALSE
  • The grammar of graphics in ggplot2:
    • Start with a tidy data frame
    • Add a geometric representation
    • Add aesthetic mappings
  • Working with histogram binwidth "error" message
  • You don't necessarily have to pass labels for every argument
  • "color" (0-1D) vs "fill" (2D) in ggplot2
  • Mapping color vs setting color
  • Adding labels using labs
  • Using palettes (in particular, scale_color_brewer)
  • Specifying exact colors (in particular, scale_fill_manual)
  • Using position (stacking vs side-by-side)
  • Using alpha (transparency)
  • Faceting

Session 4

  • Naming code chunks
  • Using the code chunk navigator in the RStudio IDE
  • Data types in R
  • str() to look at data types (mirrored with blue triangle in Environment tab)
  • View() to look within data frame (mirrored with clicking name in Environment tab)
  • Factors in R
  • Using mutate to transform variables to factors (including ordered)
  • Using select and filter to subset data

Session 5

  • Hands on work!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published