I'm having trouble finding clear documentation on how to set up a batch file for a Sweave document in Windows XP.
I use batch files that are found here
I created run.bat
batch file run.bat
that contain the following:
Sweave myFile.Rnw
The first thing I do in the Sweave file after installing wd is to read in the dataset using the RODBC
package:
library(RODBC) fetch <- odbcConnect("myDatabase") myData <- "select * from myTable" x <- sqlQuery(fetch, myData) odbcCloseAll()
When I run the batch file, I get the following error:
Error: chunk 2 Error in library(RODBC) : there is no package called RODBC In addition: Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'xtable'
Obviously, these packages exist and are functional, but something is wrong in the permissions or it does not find the necessary directories. Any thoughts?
Related question here
Chase
source share