Skip to Main Content

Intro to Coding in R, Part I: The Fundamentals

Learn what R is, why it's a favored analytical tool for many scientists, how to install and navigate programs for working in R, and the basics of R coding.

Coding Task Description

 

Are you ready to code? Here are a handful of important tips to get started:

  1. The tutorial itself is hosted at the link below. Click to get started!
  2. To get you accustomed to the coding process in R, this tutorial -- like most coding projects -- is linear, building upon itself from beginning to end. This means that if you jump around, your code may not work as expected, and you could encounter errors. The tutorial contains convenient buttons in each code chunk to copy material into your R script if you want to jump quickly from heading to heading. If you encounter errors, try going back a few steps to make sure you didn't miss any key steps.
  3. You'll likely learn more if you type code out yourself rather than copy-pasting, but it's up to you!
  4. The single most common source of errors in R are typos! If things aren't working, triple check your spelling, punctuation, and capitalization.
  5. This was created by an ornithologist, so your examples are all about birds :)
  6. Feel free to email me with any questions!
  7. Have fun!

Click here for the Intro to R, part I tutorial!

*The prints above are from John James Audubon! Check out the library's rare prints of his artwork from the 18th & 19th centuries on the 6th floor!

Link to Lesson in GitHub

This guide employs the library's GitHub page to promote coding literacy. What does this mean for you?

  • Most importantly, the meat of this R tutorial is hosted at the link below. Click on it to open a new page in your browser and get started.
  • All materials associated with this guide, including the source code used to create the R tutorial itself, are publicly available! If you're ever interested in learning how to communicate your science through documents produced in R, check it out!

Click here for the Intro to R, part I tutorial!

Source materials available on the Tulane Howard-Tilton Memorial Library GitHub

Workshop Data for Importing/Downloading

In this workshop, you'll learn how to both create data from scratch and import data. You'll practice data importing and processing with the file hosted in this box. For now, download the file to a desktop or folder that's easy for you to find. The tutorial will walk you through reading the file into R and incorporating it into your workflow.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.