Analyzing Behavioral Data in R

From Ucsbgalaxy
Jump to: navigation, search

It is possible to import data directly from google docs into R.

  1. First, publish the page on google docs.
  2. Go to the file menu, and select "Publish to the Web"
  3. Hit the button Start Publishing
  4. Select CSV below
  5. Copy the link that is generated
  6. In R, use the following, replacing your url with the one in the 2nd R command
  require(RCurl)
  myCsv <- getURL("https://docs.google.com/spreadsheet/pub?key=0AkJuO1gYG12tdGJvckxnNWt2dVBYYmE4cXA4RjAwa0E&single=true&gid=0&output=csv")
  read.csv(textConnection(myCsv))