Question

I want to use knitr/sweave to generate a report via a function call. I have a function which creates some plots and tables. I want to give an option in that function to generate a pdf report with those plots. This function will be part of an R package.

The way I approaches this was that I will port a rnw template with the package and whenever the pdf generation option is active, use that template and counter to generate the report. The problem with that is, I don't know where the user will install the package, so location of the rnw file will be a problem also can I pass input arguments to the knit function which can be used in the report?

Any thoughts?

Was it helpful?

Solution

You are after system.file.

The knitr vignette for using jQuery DataTables documents (and does) this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top