[R] Error in Sweave but not underlying script
Bush, Daniel P. DPI
Daniel.Bush at dpi.wi.gov
Fri Nov 16 20:26:11 CET 2012
I'm trying to use Sweave to create a dynamic report of a variety of financial data checks. I have an .R code file to pull the data from a database, manipulate and filter it, and create individual data frames for each test. My Sweave .RNW document then calls that file with source() to generate the data for the report. The .R file works fine on its own, but when I run it from within the Sweave document I get the following error message:
Error in .subset(x, j) : only 0's may be mixed with negative subscripts
Again, the .R code works perfectly well on its own--I only get the error when calling it through Sweave. Is there some quirk to Sweave that certain functions don't work properly?
I am using the built-in Sweave function within RStudio 0.97.168.
DB
Daniel Bush
School Finance Consultant
School Financial Services
Wisconsin Department of Public Instruction
PO Box 7841 | Madison, WI 53707-7841
daniel.bush -at- dpi.wi.gov | sfs.dpi.wi.gov
Ph: 608-267-9212 | Fax: 608-266-2840
More information about the R-help
mailing list