/Learn-to-code-R

Learn to Code: R for Data Analysis

Primary LanguageHTML

Learn to Code: R for data analysis

Schedule 2022

June 2: R Intro

  • Orientation in Rstudio
  • Alien signals demo
  • Map demo
  • R syntax
  • Data types

June 9: Data analysis I

  • Sets of data: vectors, lists, data.frames, and tibbles
  • Math and logic
  • Operators and functions
  • If/else
  • User-defined functions

June 16: Data analysis II

  • Manipulating tables with dplyr
  • Summary statistics
  • Read and write files
  • Plotting with ggplot2 and extensions

June 23

  • Data wrangling and cleaning, pivots, and joins
  • Regular expressions and string interpolation
  • Nested data, functional programming, and modeling
  • Storytelling with plots
  • Interactive figures with ggiraph & plotly

An introduction to working with research data

Get R and R studio

Find the install instructions here and get R and Rstudio installed on your computer.

Get a Github account.

Look into the usethis package to setup Github in Rstudio

Resources

R for data science

https://r4ds.had.co.nz/

tidyverse documentation / cheatsheets

www.tidyverse.org

Data handling practices

How to solve coding errors and other technical issues

  • Restart and try again
  • Check your code for obvious issues - typos, symbols in the wrong place, etc.
  • Google it! Include keywords: the language, library, and function you are using, as well as the error message.
  • Read the documentation for the software you are using.
  • Try to reproduce and isolation the issue with a minimal dataset and with as little code as possible.
    • Create a reprex of your problem.
  • If you can't solve your issue and it seems rather basic, try posting on social media like reddit or twitter.
  • If it is a more complex issue and the question isn't already solved by what's on StackOverflow, post it there.
  • Include as much information as possible!
  • Discuss what you've tried already and what the output was.