Every course we teach has logistics. The way we handle logistics has changed over time.

Logistics Techniques

Many old-time techniques are still good, but some of them are not well suited to teaching with computation and not well integrated with R.

Logistical Needs

Here are some basic areas needed for just about every R-based class.

  1. Providing R
  2. Distributing data files
  3. Distributing class notes
  4. Distributing R commands

These same areas apply to other software: JMP, Python, Matlab, Mathematica, etc.

Providing R

Some Options:

Many beginning students: Use a server

Every student has a Facebook account, so they already have access to the hardware they need.

Advantages

  • No student set up
  • Everyone has exactly the same interface
  • Dogs can’t possible eat their computer.
  • Students can share their account with you — you can see what’s wrong to help them.
  • Update of version and packages is centralized

Disadvantages

  • Possible load problems
    • Hundreds of students simultaneously in class
    • Thousands of students asynchronously
  • Working with your IT Department. Some are great, others have limited resources.
    • Work-around, as necessary. A server can be set up on the Cloud, e.g. Amazon Web Services. Good documentation of process for sys-admins.

Distributing Data Files

and even …

Students Download Files

Problems

  • Students may not put files where they should.
  • Uploading files to RStudio Server can be confusing. Students don’t understand that the server is another machine running another operating system.
  • Students will use the wrong R function.
  • Updating is a nightmare.

Advantages

NONE

Functions for reading in files with short names

Set up a web repository for files. Write a function that looks up short names on that repository.

Example:

G <- mosaic::fetchData("Dome.csv")
## Retrieving from http://www.mosaic-web.org/go/datasets/Dome.csv

Advantages

Disadvantages

Existing Packages

Packages are the standard way for distributing R software. They also provide facilities for data, for notes, and for Rmd templates.

The data set you want to use may already exist in a CRAN or other package.

Command to access the data:

Finding the data you want:

Shared, Simultaneously Editable Data

For student project collaborations, or …

When collecting data from the class, let the students enter it for you.

Google Spreadsheets

  1. Create the blank spreadsheet. You must use this link to your Google account: https://g.co/oldsheets
  2. Enter as much of the data or format as you want.
  3. Permit anyone with the link to edit … sharing
  4. Post that link on your web page so students can get to the file: https://docs.google.com/spreadsheet/ccc?key=0Am13enSalO74dFBPVVZyTndFWlBndVVVSmpENGpPRFE&usp=sharing
  5. “Publish” the spreadsheet to the web. (File/Publish to Web)
  6. Get the link for the file in CSV format. Google publish
  7. Post that link/command. Use mosaic::fetch, e.g.
require(mosaic)
ECOTS <- fetchGoogle("https://docs.google.com/spreadsheet/pub?key=0Am13enSalO74dFBPVVZyTndFWlBndVVVSmpENGpPRFE&single=true&gid=0&output=csv")

Your own R Package

It’s not hard to make a simple R package. Include your data in the data directory of the package.

Example: * The sources https://github.com/dtkaplan/ECOTS-ICOTS-2014/tree/master/ECOTS/CourseR * Installation via

```r
require(devtools)
install_github("dtkaplan/ECOTS-ICOTS-2014/ECOTS/CourseR")
help(dataDocExample)
```

Distributing Class Notes

Use R/Markdown to write notes.

Options:

Distributing R Commands

Suggestion: Use R Markdown and distribute the commands just like your class notes. Give a link to the .Rmd file.

Have students copy and paste from their browser into the RStudio editor, and use “Chunks/Run All”. That will source the code.

Emerging Techniques

RStudio has “templates.” These are currently distributed from packages.

From the CourseR package.