-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Description
I have two documents.
- An Rmd file with the following:
library(sf)
x = st_sfc(st_point(c(5,5)), st_point(c(6,9)), crs = 4326)
as(x, "Spatial")
- A build script with the following:
knitr::knit("test.Rmd", "test.md")
I am able to render the rmarkdown if I run knitr interactively. However, I if run the build script with Rscript
I get an error:
## Error in as(x, "Spatial"): could not find function "as"
.
It does not seem to matter whether I set the envir
argument to new.env()
or globalenv()
.
Metadata
Metadata
Assignees
Labels
No labels