I have an index.qmd
page in quarto that loads a dataset
```{r}
test <- TRUE
source(paste0(getwd(),"/loading.R"))
```
I have another page page1.qmd
that needs to use the datasets loaded by the index page
```{r}
print(check)
print(test)
```
the loading.R
file contains code to create check
check <- TRUE
Rendering using quarto render
gives the following error:
←[1m←[34m[ 1/20] about.qmd←[39m←[22m
←[1m←[34m[ 2/20] page1.qmd←[39m←[22m
?[31m
processing file: page1.rmarkdown
|................................... | 50%
label: unnamed-chunk-1
?[31mQuitting from lines 2-7 (page1.rmarkdown)
?[39m?[31mError in print(check) : object 'check' not found
It seems that the source load doesn't put things into global memory. How can I go about doing this?