[R] Adding an Sweave Vignette to a package

From: Doran, Harold <HDoran_at_air.org>
Date: Mon, 21 Jan 2008 15:45:01 -0500


I'm finalizing development of a package that will include a vignette. Without the vignette, the package builds fine with no warnings and is ready for distribution. Now, I am following the directions for developing vignettes "Sweave, Part II: Package Vignettes" by Friedrich Leisch.

I am using a windows XP machine (other session info below). Here is what I have done.

  1. I add the 'inst/doc' directory to the package source tree.
  2. I have added the following information in the preamble of the .Rnw file

% \VignetteIndexEntry{An \texttt{R} Package for Miscellaneous Psychometric Analyses}
% \VignetteDepends{MiscPsycho, statmod}
% \VignetteKeyword{misc}

3) I then copy the file "MP.Rnw" to the 'inst/doc' directory. 4) I then run Rcmd build g:\MiscPsycho

The process begins as usual and it even tries to create the vignette. However, it runs into an error at code chunk 1 complaining that it cannot find the function called simRasch(). This simRasch function is one of the functions developed for this package and one that will exist only when the package is built. The build process is halted.

I'm not sure how to handle this. Any advice is appreciated.

Harold

> sessionInfo()

R version 2.6.1 (2007-11-26)
i386-pc-mingw32

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

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] statmod_1.3.3

loaded via a namespace (and not attached): [1] tools_2.6.1



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 21 Jan 2008 - 20:49:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 Jan 2008 - 21:30:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive