|
[Env: Win Xp / StatET 2.0 / R 2.15.0]
In my heplots package I extended the HE-examples.Rnw vignette under inst/doc. The package passes R CMD check on my machine: * using log directory 'C:/eclipse-3.7/heplots.Rcheck' * using R version 2.15.0 (2012-03-30) * using platform: i386-pc-mingw32 (32-bit) ... * checking sizes of PDF files under 'inst/doc' ... OK * checking installed files from 'inst/doc' ... OK * checking examples ... OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking running R code from vignettes ... 'HE-examples.Rnw' ... OK 'repeated.Rnw' ... OK ... However, on R-Forge and on CRAN, the following error/warning is generated: Mon Jun 4 20:18:22 2012: Checking package heplots (SVN revision 136) ... * using log directory ‘/mnt/building/build_2012-06-04-20-02/RF_PKG_CHECK/PKGS/heplots.Rcheck’ * using R version 2.15.0 Patched (2012-06-03 r59505) * using platform: x86_64-unknown-linux-gnu (64-bit) ... * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking running R code from vignettes ... ‘HE-examples.Rnw’ ... [4s/4s] OK ‘repeated.Rnw’ ... [4s/4s] OK [9s/9s] OK * checking re-building of vignette PDFs ... NOTE Error in re-building vignettes: ... Loading required package: car Loading required package: MASS Loading required package: nnet Error: processing vignette 'HE-examples.Rnw' failed with diagnostics: cannot open file 'fig/plot-plastic1.pdf' Execution halted * checking PDF version of manual ... OK I am unable to determine why the file fig/plot-plastic1.pdf cannot be opened. It is in my inst/doc/fig directory & is regenerated by the .Rnw file. What could cause this? Second, I have tried manually running tools::compactPDF("HE-examples.pdf) on the .pdf file under inst/doc in the package, but no change is made to the .pdf file. I can't see any way to correct this. -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 4700 Keele Street Web: http://www.datavis.ca Toronto, ONT M3J 1P3 CANADA ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
On Wed, Jun 6, 2012 at 8:21 AM, Michael Friendly <[hidden email]> wrote:
> [Env: Win Xp / StatET 2.0 / R 2.15.0] > > In my heplots package I extended the HE-examples.Rnw vignette under > inst/doc. The package passes R CMD check > on my machine: > > * using log directory 'C:/eclipse-3.7/heplots.Rcheck' > * using R version 2.15.0 (2012-03-30) > * using platform: i386-pc-mingw32 (32-bit) > ... > * checking sizes of PDF files under 'inst/doc' ... OK > * checking installed files from 'inst/doc' ... OK > * checking examples ... OK > * checking for unstated dependencies in vignettes ... OK > * checking package vignettes in 'inst/doc' ... OK > * checking running R code from vignettes ... > 'HE-examples.Rnw' ... OK > 'repeated.Rnw' ... OK > ... 2 suggestions. First, On your own workstation, run the cmd check like so R CMD check --as-cran package.tar.gz That will give you results more like CRAN or Rforge. Second, how did your pdf get into the folder "fig"? It makes me suspect you are using some forbidden Sweave settings. Oh, Third, here's a suggestion. Build your own vignette, copy from vignettes to inst/doc, and then in the DESCRIPTION file include the option to ask the R system not to rebuild your vignette. BuildVignettes: false I think you will see this discussed/debated in R-devel and the situation is somewhat fluid. pj > > However, on R-Forge and on CRAN, the following error/warning is generated: > > Mon Jun 4 20:18:22 2012: Checking package heplots (SVN revision 136) ... > * using log directory > ‘/mnt/building/build_2012-06-04-20-02/RF_PKG_CHECK/PKGS/heplots.Rcheck’ > * using R version 2.15.0 Patched (2012-06-03 r59505) > * using platform: x86_64-unknown-linux-gnu (64-bit) > ... > * checking for unstated dependencies in vignettes ... OK > * checking package vignettes in ‘inst/doc’ ... OK > * checking running R code from vignettes ... > ‘HE-examples.Rnw’ ... [4s/4s] OK > ‘repeated.Rnw’ ... [4s/4s] OK > [9s/9s] OK > * checking re-building of vignette PDFs ... NOTE > Error in re-building vignettes: > ... > Loading required package: car > Loading required package: MASS > Loading required package: nnet > Error: processing vignette 'HE-examples.Rnw' failed with diagnostics: > cannot open file 'fig/plot-plastic1.pdf' > Execution halted > > * checking PDF version of manual ... OK > > I am unable to determine why the file fig/plot-plastic1.pdf cannot be > opened. It is in my inst/doc/fig directory & is regenerated > by the .Rnw file. What could cause this? > > Second, I have tried manually running tools::compactPDF("HE-examples.pdf) on > the .pdf file under inst/doc in the package, > but no change is made to the .pdf file. I can't see any way to correct this. > > -- > Michael Friendly Email: friendly AT yorku DOT ca > Professor, Psychology Dept. > York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 > 4700 Keele Street Web: http://www.datavis.ca > Toronto, ONT M3J 1P3 CANADA > > ______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Paul E. Johnson Professor, Political Science Assoc. Director 1541 Lilac Lane, Room 504 Center for Research Methods University of Kansas University of Kansas http://pj.freefaculty.org http://quant.ku.edu ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
Hi,
I have very carefully developed several S4 classes that describe censored water-quality data. I have routines for them that will support their use in data.frames and so forth. I have run into a problem when I try to use the S4 class as the response variable in a formula and try to extract the model frame. I get an error like: Error in model.frame.default(as.lcens(Y) ~ X) : object is not a matrix In this case, as.lcens works much like the Surv function in the survival package except that the object is an S4 class and not a matrix of class Surv. I would have expected that the model.frame function would have been able to manipulate any kind of object that can be subsetted and put into a data.frame. But that appears not to be the case. I'm using R 2.14.1 if that matters. I can supply the routines for the lcens data if needed. Am I looking at needing to write a wrapper to convert all of my S4 classes into matrices and then extract the necessary data in the matrices according to rules for the particular kind of S4 class? Or, am I missing a key piece on how model.frame works? Thanks. Dave [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
The help for model.frame says
Only variables whose type is raw, logical, integer, real, complex or character can be included in a model frame: this includes classed variables such as factors (whose underlying type is integer), but excludes lists. Some S4 objects are of one of those types, but some are not. Some matrices are, some are not. Objects of class "Surv" are. On 23/07/2012 21:33, David L Lorenz wrote: > Hi, > I have very carefully developed several S4 classes that describe > censored water-quality data. I have routines for them that will support > their use in data.frames and so forth. I have run into a problem when I > try to use the S4 class as the response variable in a formula and try to > extract the model frame. I get an error like: > > Error in model.frame.default(as.lcens(Y) ~ X) : object is not a matrix > > In this case, as.lcens works much like the Surv function in the survival > package except that the object is an S4 class and not a matrix of class > Surv. I would have expected that the model.frame function would have been > able to manipulate any kind of object that can be subsetted and put into a > data.frame. But that appears not to be the case. I'm using R 2.14.1 if > that matters. > I can supply the routines for the lcens data if needed. > Am I looking at needing to write a wrapper to convert all of my S4 > classes into matrices and then extract the necessary data in the matrices > according to rules for the particular kind of S4 class? Or, am I missing a > key piece on how model.frame works? > Thanks. > Dave > > [[alternative HTML version deleted]] The posting guide asked you not to do that. And to do your own homework. -- Brian D. Ripley, [hidden email] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
| Powered by Nabble | Edit this page |
