Connecting google sheets with R

I read data into R from spreadsheets all the time, but today I had a google sheets document from a google survey that I wanted to upload. And because I'll be doing this every week, I didn't want to manually export each time. Of course, there is a package for that! Written less than a year ago. (And of course, it's part of the tidyverse). 

Very easy process: 

  1. Install googlesheets package 
  2. Use the gs_ls() command to view the available google sheets associated with your google account (may prompt you to log in first) 
  3. Use X = gs_title('[Title of your gsheet]') to point to the right spreadsheet 
  4. Use ds = gs_read(ss = g, ws = [Title of the tab]') 

Voila! You have a tibble called ds with your data.