Learn about R and Write First Toy Programs
Quan Li · 2018
Abstract This first chapter provides an overview of the steps for completing a research project, offers a one-paragraph introduction to R, shows how to install R and its add-on packages, mentions how to get help, presents an example of how to write and execute a simple R program as an ice-breaker, demonstrates how to create, describe, and graph a variable in R with a simple numerical example, illustrates how to report descriptive statistics in a table, and concludes by applying the R code to a real-world data example from a published article. The chapter also shows common coding errors and a variety of logical and mathematical operators, how to use R on Mac machines, how to export output from R, and how to install and use RStudio.