Exploring Environmental Data

6 January 2023

Lecture Topics

R and RStudio

Let’s open up RStudio and explore.

Windows in RStudio

When you open RStudio you see a number of windows (panes). Some of the key ones are

Let’s walk through each of these windows.

Packages in R

Packages are a collection of functions that allow you to easily perform useful operations. You can think of packages as “apps” (like you might install on a phone/computer) that add functionality to your phone/computer.

You can install packages directly in R by typing install.packages("package_name_here") directly in the console or by using the install button in your “Package” pane.

Once you’ve installed a package you never need to install it again, but each time you open R and want to use it you need to load the package using library("package_name_here").

If you have R and RStudio on your computer, let’s go ahead and install the tidyverse package (if you haven’t yet done so)

Programming (Coding) in R

Quick note on the Console

Quick notes on programming

Some reassuring reminders/advice

Preparing your directories and work environment

Before we get started let’s discuss two important topics that are key to maintaining an organized and streamlined work environment.

Now let’s dive right into some programming

  1. Open up your Lectures project and create a new R Notebook
  2. Follow along with the html R Notebook on our class site and create your own R Notebook. We’ll go over some quick basics before you try to work through the notebook.