Course Software Setup

In this assignment, you’ll set up the various software packages, accounts, and set-up requirements you need for the course:

  1. R
  2. RStudio
  3. OneDrive
  4. Windows Virtual Desktop
  5. Course folder and RProject

You’ll also set up your course folder and create a course RProject.

Before you proceed, make sure you know how to take a screenshot on your computer.

The procedure for taking a screenshot on your computer depends on your operating system. You can check out this article for an overview of how to do so on most operating systems. You can also consult Dr. Google if you run into trouble.

Instructions

For this assignment, you need to work through the various walkthrough sections which will help you set up the required course software.

After you’ve completed the walkthroughs, you can complete the exercises and build the report. You’ll submit your assignment report via Moodle.

Walkthroughs and Tutorials

Microsoft OneDrive

If you haven’t already done so, you should navigate to the Online File Storage & Collaboration page to set up your account.

When you have successfully set up your OneDrive account, complete the following:

  1. Log in to UMass OneDrive and navigate to the “My Files”.
  2. Using the + New dropdown menu, create a new One Note document. Name the document hello_world.

My OneDrive page looks like this:

Azure Virtual Desktop (AVD)

Azure Virtual Desktop may also be referred to as Remote Desktop

Follow these instructions to activate your Azure Virtual Desktop account:

Request AVD Access

  • Navigate to the UMass IT’s Windows Virtual Desktop page and follow request access instructions.
    • You may need to provide some details such as which course(s) you are taking and which software you need access to.
    • If you are asked to select software, make sure that you select Arc GIS Desktop by ESRI.

You’ll receive an email once your AVD account is set up. This usually takes a couple of days.

If you haven’t received a confirmation email within 2 days, check your spam folder. In previous semesters many students’ confirmation emails ended up in their Junk mail.

  • Alternatively, you can simply try logging in to the AVD system. If you are successful it means your account is set up!

Log into the AVD system

When you have AVD access, log in to AVD in your browser.

In my browser it looks like this:

Start a AVD Windows session

Click on the UMass Classroom 2 icon to start a remote Windows session.

  • You may be prompted to allow your browser or the client to access resources on your computer. You should allow this.
  • You may be asked to enter your UMass credentials.

On my computer, AVD looks like this:

It should look similar on your machine.

  • Take a screenshot of your AVD desktop.

AVD File Explorer and OneDrive

Within AVD, double click the File Explorer to open up a file browser window:

Next, open your OneDrive folder.

  • In the left panel, you should see an icon for OneDrive - University of Massachusetts. Click here to open your main OneDrive folder.
  • You should see an icon for the hello_world document you created when you set up your OneDrive account.

R and RStudio

R is a statistical programming language widely used by researchers in all kinds of industries and research fields.

RStudio is an Integrated Development Environment (IDE) for R.

  • This is a fancy way of saying that RStudio provides a user-friendly interface to R, along with a set of tools for building, organizing, and running your R code!

Download R and RStudio

If you’re already a whiz at installing software, feel free to download and install R and RStudio on your own.

R is here: https://cran.r-project.org/ RStudio is here: https://rstudio.com/

Installation Resources

Rather than reinventing a wheel that’s been invented successfully by many others I’ll direct you to some resources with more in-depth instructions for setting up the software:

Text-based tutorials

rstudio-education

RStudio Education has some straightforward instructions here:

https://rstudio-education.github.io/hopr/starting.html

YaRrr! The Pirate’s Guide to R

YaRrr is a great free and open-source R learning resource. Check out the instructions for installing R and RStudio here

YouTube tutorials


If you like video tutorials check out these resources:

Xperimental Learning

This is a detailed and gently-paced tutorial

Self-Assessment

Once you’ve successfully set up the software, you should be able to open the RStudio program and see something like this:

NOTE: Your RStudio session may have slightly different fonts, styling, colors, etc. depending on your operating system and operating system themes.

Filesystem Background

Keeping your course files organized is a key part of success in this and any other course.

Before you proceed with this part of the walkthrough, it is essential that you understand the basics of how files are stored on your computer. Specifically, you need to understand the concepts of:

  • Directories, also known as folders
  • Absolute paths
  • Relative paths

You’ll also need to know how to do the following:

  • Locate files you downloaded in your browser
  • View files through your system’s file browser system. This will be slightly different depending on whether you use Windows, MacOS, or Linux.
  • Create new folders.

Since there are many great resources for learning about these basic concepts, I’ll leave it to you to make sure you familiarize yourself with these concepts.

To get started here are a few resources:

Filesystem Resources

Geeks 4 Geeks: File Systems in Operating System article on general filesystem concepts. The first few sections of relevant to our course, the following sections on file allocation etc. are not relevant for us.

Geeks 4 Geeks: Structures of Directory in Operating System A good overview of how directory structures work. Has a nice discussion about the tree-like nature of directory structures. The article sections that are relevant to us are:

  1. Single Level Directory
  2. Two Level Directory
  3. Tree-structured directory

The other sections are not relevant for us.

Create Your Course Directory

  1. Choose a location on your computer where you want to store all of the files for this course.
    • This should be in a logical place that you will remember.
    • This should not be in your Downloads or Desktop folders.
    • This should not be in any temporary folder. These typically include the words temp or tmp in the directory name.
    • This should not be in a folder in which your operating system installs programs.
  2. Create a directory called “environmental_data”. I’ll refer to this as your course directory or course folder throughout the semester.
    • Note that the underscores are very important.
You should never use spaces in your directory or file names. Your operating system might allow you to do this, but many programs cannot interpret paths that contain spaces.
  1. Create the following subdirectories of your course folder. The lower-case letters are important since R is case-sensitive:
    • data
    • assignments

You are free to create any additional folders you like, for example to store script or notes documents. I suggest you create a logical and self-explanatory set of subdirectories.

A basic course folder setup should look like this:

Create a Course RProject.

Create a New Project

  1. Open up RSTudio.
  2. From the File menu, choose the New Project.. option.
  3. Select the option to create a project in an existing directory.
  4. Navigate to your course folder and create the project!

Always Load Your RProject!!!

You’ll need to make sure that your RProject is open in RStudio when you do any work for this course. The easiest way to ensure that your course RProject is loaded is to open RStudio by double-clicking on the environmental_data.RProj file.

You can tell if your RProject is loaded by looking in the upper-right corner of the RSTudio window (see the screenshot below).

Set Up RProject Options

There are a couple of crucial options you need to set for your RProject.

  1. You need to tell RStudio to save your command history.
  2. You need to tell RSTudio not to save and restore your environment when you quit and re-start RStudio.

You can find the Project Options via the Tools menu.

You should set the appropriate options as shown in this screenshot:

Exercises

Exercise 1: OneDrive

  1. Log in to your UMass OneDrive account in your browser.
  2. Take a screenshot of your “My Files” page.
    • Make sure that your name is visible in the upper left of the page.
    • Make sure that your ‘hello_world.docx’ file is visible

Self test: My OneDrive My Files page looks like this

Exercise 2: Azure Virtual Desktop

  1. Request AVD access.
  2. Start a AVD session in your browser.
  3. Open a File Explorer window and navigate to the OneDrive folder.
    • Make sure that the hello_world document is visible.
  4. Take a screenshot.

Exercise 3: RStudio - Hello World

  1. Start RStudio on your computer.

  2. Locate the console. It’s usually in the lower left panel.

  3. Type the following (replacing the my name with yours) and press enter:

    Hello world, it's me Mike Nelson

  4. Type the following command into the console and press enter:

    getwd()

  5. Take a screenshot of your RStudio session.

Self test: My RStudio session looks something like this:

Your RStudio session may have a different color and font scheme. You can customize the appearance of the RStudio IDE. I prefer a dark background with light text.

Exercise 4: Course Folder

  1. Using your computer’s file browser, navigate to your course folder and take a screenshot. The screenshot must show:
    • The two required subdirectories
    • The environmental_data.RProj file

Exercise 5: RProject and RProject Options

  1. Open your course RProject.
  2. Open the project options (in the tools menu) and verify the correct settings.
  3. Take a screenshot of your project options. Your screenshot needs to show:
    • Your RProject loaded
    • Correct options for loading .RData

Report

To complete this assignment you’ll create a document that includes the following screenshots:

  1. OneDrive
  2. Azure Virtual Desktop
  3. RStudio session with hello world
  4. Course Folder
  5. RProject with correct project options

Create a pdf document that includes the 5 screenshots and submit it on Moodle.