New RMD will not knit

I am starting a new project with RMD. However, I am unable to knit even the default html RMD. I open a new project, click file> new file> RMD (Document, HTML). I press knit, without changing any of the default code.

This is the error:
Error in strsplit(Sys.getenv("R_LIBS")) :
argument "split" is missing, with no default
Calls: .libPaths ... Sys.glob -> path.expand -> path.expand -> unlist -> strsplit
Execution halted

I have knit RMD documents in the past and have not knowingly updated R or made any major changes since that time. Seemingly suddenly, I have lost the ability to knit even the default html RMD in my local R IDE. Anyone have any suggestions?

Which RStudio version do you have ?
Can you share your package version ?

xfun::session_info(c("rmarkdown", "knitr"))

Resolved by updating the latest R and R studio.

The solution was to reinstall the latest versions or R and R studio. I was hesitant to do so in the first place but it turns out the local R IDE should not impact R sessions/packages running in the organization's VM.

Original Problem: Open a new R session, Open a new RMD file, click knitr. I was expecting this to just knit the default RMD document generated by R as an HTML. There were no changes to the default RMD code.

Original Error:

Error in strsplit(Sys.getenv("R_LIBS")) :

argument "split" is missing, with no default

Calls: .libPaths ... Sys.glob -> path.expand -> path.expand -> unlist -> strsplit

Execution halted

Solution: Update to the latest version of R and R studio. Open a new R session, try to knit the default RMD as html document. (Relevant packages will be reinstalled in the new version of R you just updated.) The document should knit successfully.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Thanks for your follow up.

My local R IDE version is 1.2.5019.

And running xfun::session_info(c("rmarkdown", "knitr")) results in this:
R version 3.6.1 (2019-07-05)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 10 x64 (build 17763), RStudio 1.2.5019

Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding

Locale:
LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
LC_MONETARY=English_United States.1252 LC_NUMERIC=C
LC_TIME=English_United States.1252

Package version:
base64enc_0.1.3 digest_0.6.23 evaluate_0.14 glue_1.4.2 graphics_3.6.1 grDevices_3.6.1
highr_0.8 htmltools_0.5.0 jsonlite_1.7.1 knitr_1.30 magrittr_1.5 markdown_1.1
methods_3.6.1 mime_0.9 rlang_0.4.8 rmarkdown_2.6 stats_3.6.1 stringi_1.5.3
stringr_1.4.0 tinytex_0.28 tools_3.6.1 utils_3.6.1 xfun_0.19 yaml_2.2.1

Pandoc version: 2.7.2