[R] rmarkdown and source call to R file.
gpd@be+r @end|ng |rom m@||box@org
Fri Jan 22 07:49:17 CET 2021
I'm new in R and this list.
I made a shiny app using R studio.
my files are:
All the files are on the same directory and helper.R is a file that
contains a lot of functions used in Report.Rmd and server.R
for some reason I cant call from Report.Rmd the file helper.R
My code in Report.Rmd is
## Summarize table
source("helper.R", local = knitr::knit_global())
If I use absolute path it works but since I want to upload it to
https://www.shinyapps.io/ I must make it work with relative path.
The message I get is:
processing file: Report.Rmd
ordinary text without R code
label: unnamed-chunk-1 (with options)
List of 1
$ echo: logi FALSE
Quitting from lines 13-17 (Report.Rmd)
Warning: Error in file: cannot open the connection
[No stack trace available]
The funny thing is that if I put the cursor inside "" at the beginning
and I press tab I get the option to choose helper.R. So Im guessing
that I'm on the right directory.
Any ideas what I'm missing?
I'm stuck on this lines of code 2 days now.
I would really appreciate
Thanks in advance for your help!!!
ps. I tried all the combinations in Tools->Global Options-> "Evaluate
chunks in directory" with no luck.
More information about the R-help