Loops in R

link to data Introduction to using for loops What Are Loops? “Looping”, “cycling”, “iterating” or just replicating instructions is an old practice that originated well before the invention of computers. It is nothing more than automating a multi-step process by organizing sequences of actions or ‘batch’ processes and by grouping the parts that need to be repeated. All modern programming languages provide special constructs that allow for the repetition of instructions or blocks of instructions.

Introduction to Dataframes in R

link to pdf Reading CSV datafiles into R We often store our data in comma seperated value (CSV) files, which can be read into R using the read.csv() function: # Download example .csv file download.file("https://ndownloader.figshare.com/files/2292169", "data/portal_data_joined.csv") # Save into variable surveys <- read.csv('data/portal_data_joined.csv') Note: this code requires having a data/ folder in your project Functions for characterizing dataframe We can run the name of the variable to view the dataframe, but often there will be too much information to display in the console