我试图弄清楚自动允许 googlesheet4 包选择我的预授权帐户来下载特定谷歌表格的方法是什么。
例如 - 我想每天运行以下一次 -
library(googlesheets4)
delta<-read_sheet(
"https://docs.google.com/spreadsheets/xyz...",
sheet = "XYZ Delta"
)
控制台给出以下输出:
The googlesheets4 package is requesting access to your Google account.
Select a pre-authorised account or enter '0' to obtain a new token.
Press Esc/Ctrl + C to abort.
1. [email protected] /cdn-cgi/l/email-protection
从上面可以看出,我已经在上一步中授予了它访问该帐户的权限,以使用 google 工作表。但它仍然要求我手动输入“1”来选择此帐户。
是否可以自动执行此操作,以便在自动安排此代码时无需手动输入“1”来运行此脚本?
如果您能指出我正确的方向,我将不胜感激!
Call gs4_auth
before read_sheet
gs4_auth("[email protected] /cdn-cgi/l/email-protection")
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)