library(tidyverse) library(googlesheets4) gs4_auth() googlesheet <- read_sheet( ## The first argument is the sheet ID. This is usually the random array of characters between the last slash in the URL and ## the second-to-last slash. Put this ID into quotes in the first argument "YOUR SHEET URL CODE HERE", ## The second argument is the range in A1 notation (the way you would reference a sheet inside a formula) range = "A1:P", ## The third argument I use are the col types, but you can find all the arguments here: https://googlesheets4.tidyverse.org/reference/read_sheet.html ## col types are especially required for things like columns containing dates. All column types are found in the link above col_types = "ENTER COL TYPES HERE WITH NO SPACES") view(googlesheet) #googlesheetgathered <- googlesheet %>% gather(key = Period,Totals,2:9) sheet_write(googlesheetgathered, ss = "YOUR SHEET URL CODE HERE", sheet = "SHEETNAME")