Hi! I am getting an error and can't figure out whether it's the Google sheet format or a code problem. This is an exercise in the LeanPub course. Any help would be appreciated! It looks like a google sheets issue but I've tried everything I know to do to fix it and can't.
get data from your Google sheet
df <- leanpub %>%
- gs_read()
Error in inherits(ss, "googlesheet") : object 'leanpub' not found
run a few checks on the data
check_data(df)
Error in if (ncol(x) != 4) { : argument is of length zeroplot relationships between cost and readers
qplot(readers,minimum,data=df)
Error inggplot()
:
! You're passing a function as global data.
Have you misspelled thedata
argument inggplot()
Runrlang::last_error()
to see where the error occurred.get function needed to check data
source('/cloud/project/projectfiles/check_data.R')
install necessary packages
source('/cloud/project/projectfiles/packages.R')
load necessary R packages
library(googlesheets)
library(dplyr)
library(ggplot2)register your Google sheet
STOP! You have to paste your Google Sheet link below!
link = "leanpub_data - Google Sheets"
check_link(link)leanpub <- gs_url(link)
Sheet-identifying info appears to be a browser URL.
googlesheets will attempt to extract sheet key from the URL.
Putative key: 1BzEbjaYHRCzuLRTyoY9yWyoT1mDA_82_4XBbP0esVFk
Worksheets feed constructed with public visibility
Error in rGET(x, omit_token_if(grepl("public", x))) %>% httr::stop_for_status() :
Not Found (HTTP 404).get data from your Google sheet
df <- leanpub %>%
- gs_read()
Error in inherits(ss, "googlesheet") : object 'leanpub' not found
run a few checks on the data
check_data(df)
Error in if (ncol(x) != 4) { : argument is of length zeroplot relationships between cost and readers
qplot(readers,minimum,data=df)
Error inggplot()
:
! You're passing a function as global data.
Have you misspelled thedata
argument inggplot()
Runrlang::last_error()
to see where the error occurred.