Chapter 2 Purpose
The purpose of this tutorial is to start building and strengthening foundational coding skills in R. We take a functional and active approach to learning R. We believe that the easiest way to learn R is by using R. Giving you some building blocks and suggesting some strategies for overcoming common coding obstacles will allow you to begin exploring the language. You never need to actively memorize code chunks or functions. You will become proficient naturally with many hours of practice. Therefore, the goal of this tutorial is to expose you to what R can do so that you know what tools you have at your disposal when you are later working through a problem.
Today’s tutorial will cover:
- How to download and install R and RStudio
- The panes of RStudio
- How to create and use R Markdown Documents
- Arithmetic commands
- (Some of) the different types of variables in R
- What functions are and how to use them
- How to install and load packages and…
- How to import data into R
At the end of this tutorial is a set of Minihacks. Minihacks are small coding exercises intended to test your knowledge of the day’s material.
Note: This tutorial has been modified from labs created by Cameron Kay and Sarah Dimakis for PSY 611 (Data Analysis I; Fall 2020).