Closed chipoglesby closed 8 years ago
Try the following steps:
library(RGA)
authorize(client.id = " MyClientID", client.secret = "MyClientSecret", cache = "/projdir/ga-token")
--- title: "Untitled" output: html_document --- ```{r} library(RGA) authorize(client.id = " MyClientID", client.secret = "MyClientSecret", cache = "/projdir/ga-token") list_accounts() ```
Note that when the OAuth token refreshed R-session rewrite the cache file. So you need write permissions for this file,
~ % Rscript -e 'knitr::knit("/tmp/test.Rmd")' :( processing file: /tmp/test.Rmd |................................ | 50% ordinary text without R code |.................................................................| 100% label: unnamed-chunk-1 output file: test.md [1] "test.md"
Thank you, I'll try this now.
This works. Thank you @artemklevtsov for your help!
Hi @artemklevtsov, I'm trying to create a file that can be ran via cron job. It's basically just:
knitr::knit('report.Rmd').
When I run it in terminal, this is the error that I get:
In the RMD file, I've called
library(RGA)
and authorize() and I've also triedauthorize(cache=TRUE, reauth=TRUE)
but I still get the error.Do you have any ideas why this may be happening and how I can fix it?
Thank you.