I was trying to render R4DS to PDF, but the build failed at strings.Rmd with the following error:
Quitting from lines 78-83 (strings.Rmd)
Error in str_locate(string, pattern) :
argument "pattern" is missing, with no default
Calls: local ... withVisible -> eval -> eval -> str_view -> str_locate -> type
Execution halted
Error in Rscript_render(f, render_args, render_meta, add1, add2) :
Failed to compile strings.Rmd
So I open the strings.Rmd script and try to execute the following chunk at line 78 (after executing the 2 previous chunks to assign variables):
x <- c(single_quote, double_quote, backslash)
x
str_view(x)
, but it fails with the following error:
[1] "'" "\"" "\\"
Error in str_locate(string, pattern) :
argument "pattern" is missing, with no default
It seems that str_view() isn't able to execute without a second pattern = argument. The documentation for str_view() also shows it as being able to run with only the first argument, but it is not working for me.
This is making it impossible to render R4DS as is, and it seems like I have to replace every str_view() with writeLines() to get the intended output.
I was trying to render R4DS to PDF, but the build failed at
strings.Rmd
with the following error:So I open the
strings.Rmd
script and try to execute the following chunk at line 78 (after executing the 2 previous chunks to assign variables):, but it fails with the following error:
It seems that
str_view()
isn't able to execute without a secondpattern =
argument. The documentation forstr_view()
also shows it as being able to run with only the first argument, but it is not working for me.This is making it impossible to render R4DS as is, and it seems like I have to replace every
str_view()
withwriteLines()
to get the intended output.Session Info: