Setting .libPaths() For Running R Scripts From Command Line Using Rscript.exe
问题 I am trying to run R scripts via BAT files on Windows Command Prompt. The scripts require a few R packages such as data.table , tidyR , etc. For operational reasons, all required R packages and dependencies (including data.table ) are installed at C:\Users\username\Documents\R\R-3.5.1\library . I am not allowed to install RStudio in this environment. When I try "C:\Program Files\R\R-3.5.1\bin\x64\Rscript.exe" script.R , I get an error similar to Error in library(data.table) : there is no