Literate-Programming icon indicating copy to clipboard operation
Literate-Programming copied to clipboard

Unable to Connect RStudio to Google Sheets

Open Oardi236 opened this issue 2 years ago • 2 comments

From Module 5, I opened Module05.Rmd in RStudio and tried to run line 49 to 50 like Andrew said:

if (!require("pacman")) install.packages("pacman") # if pacman is not installed, the install it.
pacman::p_load(effectsize, ggpubr, ggstatsplot, googlesheets4, janitor, jtools, knitr, parameters, rio, remotes, report, rstatix, tidyverse,  see, sjPlot, sjmisc) # load/install required packages

# Load your data ----------
df <- read_sheet("https://docs.google.com/spreadsheets/d/1fFVmBFpdAKxzLMT8dx7pZm48mo9CE3kIwYhrkaZj7NM", sheet = "1")  

The first time, it opened google sheets and I was able to connect my RStudio to my Gmail account. DF was supposed to appear in my environment but it did not. I tried to re-run lines 49-50 but just get the error seen in the image below. Screen Shot 2024-02-05 at 9 44 49 PM

I'm not sure how to proceed now.

Oardi236 avatar Feb 06 '24 02:02 Oardi236

I've exited RStudio and redid my steps (opened the document, ran those lines, and reconnected RStudio to google sheets) and received this new error message. Screen Shot 2024-02-05 at 9 48 03 PM

Oardi236 avatar Feb 06 '24 02:02 Oardi236

Good morning,

The links to the datasets were modified when I changed Google accounts. I have updated Module05.Rmd which you can download here

Simply copy/paste the new code to replace that in the old version. Below is a video showing you the steps.

Thanks for posting your issue.

IMAGE ALT TEXT HERE

alapo avatar Feb 06 '24 13:02 alapo