R for Beginners

Friday, October 11th 12:00pm – 2:00pm

  • Nishan Bhattarai, Ph.D., is a postdoctoral research fellow at the School for Environment and Sustainability (SEAS), University of Michigan and specializes in the use of large remote sensing and climate data for agro-hydro-climatic assessments. He is currently studying the impacts of climate change and groundwater depletion on crop water stress and farming decisions in India using remote sensing, field, and climate data.

This workshop is designed for those interested in learning R as a beginner. The participants will learn the basics of using R for statistical analyses (e.g., reading data, plotting, data types, cleaning data, etc.). The basic concepts of coding in R will also be introduced. Course materials include a very short mini-lecture and several tutorials/exercises. This workshop is designed for beginners; no advanced statistical analysis in R will be covered. However, the participants will get familiarized with basic functions and tools used in R, which could be useful for learning/performing such analysis in the future.

The workshop will include a short lecture, hands-on tutorials/exercises and one problem set.

·        Downloading R and RStudio, Intro to R and Exercise 1 (Calculations and storing variables) – 50 minutes

5-minute break

·        Exercise 2 – Data type and variable type, Order, Subsetting, Writing out Data – 40 minutes

5-minute break

·        Exercise 3 – Basic Plots (Histograms. Boxplot, Barplot, and scatter plots) and wrap up– 20

Extras (For those who wants to explore more)

·        Exercise 4- dplyr (mutate, arrange, merge, and piping)

·        Exercise 5- Functions (apply)

·        Problem set (Data visualization and simple statistics): Here you will write codes on your own.

  • Learn basics of using R (how to load in data, how to create plots, how to clean datasets, how to prepare data for statistical analyses). 
  • Be introduced to basic concepts of coding (what is a vector, what is a list, how and why would I use R?)

This workshop will help participants become familiar with basic R functions, data structures, syntaxes, and visualization tools in R. It will provide a good foundation for a more advanced level R courses in future.