Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure in the case of a function call within the code options area #4

Open
davidkane9 opened this issue Feb 5, 2024 · 0 comments
Open

Comments

@davidkane9
Copy link

# Create a reprex of lightparser failure. Key issue seems to be the call to
# system.file() within the chunk options area. (In my real code, the call to
# system.file() is much longer and pulls up a text file from a package.) Remove
# `, child = system.file()` and this code will work.

library(lightparser)

bad_file <- "---\ntitle: Example\n---\n\n```{r, child = system.file()}\n```\n"

in_file <- tempfile(fileext = ".Rmd")
writeLines(bad_file, in_file)

x <- split_to_tbl(in_file)
#> It seems you are currently knitting a Rmd/Qmd file. The parsing of the file will be done in a new R session.

file_out <- tempfile(fileext = ".Rmd")
out <- combine_tbl_to_file(x, file_out)
#> Error in yaml::as.yaml(other_params): Unknown emitter error

Created on 2024-02-05 with reprex v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant