Re: [R-pkg-devel] CRAN upload and prechecking confusion (Johannes Graumann)

2017-08-25 Thread Charles Geyer
You can precompute long running things in vignettes.  See CRAN package
mcmc for examples that do this reproducibly.

-- 
Charles Geyer
Professor, School of Statistics
Resident Fellow, Minnesota Center for Philosophy of Science
University of Minnesota
char...@stat.umn.edu

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Saving provenance data to the file system

2017-08-25 Thread Barbara Lerner
We are working on a package that collects provenance as an R script 
executes, saving the provenance to the file system.  In reading the 
rules for submitting packages to CRAN, there is this rule:
> Packages should not write in the users’ home filespace, nor anywhere 
> else on the file system apart from the R session’s temporary directory 
> (or during installation in the location pointed to by |TMPDIR|: and 
> such usage should be cleaned up). Installing into the system’s R 
> installation (e.g., scripts to its bin directory) is not allowed. 
> Limited exceptions may be allowed in interactive sessions if the 
> package obtains confirmation from the user. 
To use our package, the R programmer calls a function that has an 
optional parameter to specify where the provenance is saved.  I have a 
few questions about whether this approach will pass CRAN or some other 
alternatives we have considered.

1. Currently, we save to the user's file space and provide an optional 
parameter to save the provenance somewhere else.  Is this acceptable?

2. A second alternative would be to have the default location be the R 
session's temporary directory.  To save in the user's file space, the 
user would need to provide a value for the optional parameter mention in 
#1.

3. A third alternative would be to do the same as #2 and also ask the 
user to confirm that they want to save the provenance before actually 
writing to the filesystem.

4. A fourth alternative would be to save the provenance in a database, 
which might or might not be on the user's computer.

I would appreciate advice on which of these options is likely to pass 
CRAN's rules.  Our package will be of little use if the provenance is 
not saved somewhere.

Thanks for any advice.

Barbara

-- 
Barbara Lerner
Associate Professor
Computer Science Department
Mount Holyoke College



[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] Saving provenance data to the file system

2017-08-25 Thread Jenny Bryan
I can't comment on the specific intersection of your plans and CRAN's rules, but
note that you might want to check out the rappdirs package (already on CRAN
and imported by some other packages) as a possible helper for whatever you
decide to do.

https://cran.r-project.org/package=rappdirs

-- Jenny

> On Aug 25, 2017, at 8:42 AM, Barbara Lerner  wrote:
> 
> We are working on a package that collects provenance as an R script 
> executes, saving the provenance to the file system.  In reading the 
> rules for submitting packages to CRAN, there is this rule:
>> Packages should not write in the users’ home filespace, nor anywhere 
>> else on the file system apart from the R session’s temporary directory 
>> (or during installation in the location pointed to by |TMPDIR|: and 
>> such usage should be cleaned up). Installing into the system’s R 
>> installation (e.g., scripts to its bin directory) is not allowed. 
>> Limited exceptions may be allowed in interactive sessions if the 
>> package obtains confirmation from the user. 
> To use our package, the R programmer calls a function that has an 
> optional parameter to specify where the provenance is saved.  I have a 
> few questions about whether this approach will pass CRAN or some other 
> alternatives we have considered.
> 
> 1. Currently, we save to the user's file space and provide an optional 
> parameter to save the provenance somewhere else.  Is this acceptable?
> 
> 2. A second alternative would be to have the default location be the R 
> session's temporary directory.  To save in the user's file space, the 
> user would need to provide a value for the optional parameter mention in 
> #1.
> 
> 3. A third alternative would be to do the same as #2 and also ask the 
> user to confirm that they want to save the provenance before actually 
> writing to the filesystem.
> 
> 4. A fourth alternative would be to save the provenance in a database, 
> which might or might not be on the user's computer.
> 
> I would appreciate advice on which of these options is likely to pass 
> CRAN's rules.  Our package will be of little use if the provenance is 
> not saved somewhere.
> 
> Thanks for any advice.
> 
> Barbara
> 
> -- 
> Barbara Lerner
> Associate Professor
> Computer Science Department
> Mount Holyoke College
> 
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

[R-pkg-devel] "no prebuilt vignette index" error

2017-08-25 Thread Daniel Kelley
QUESTION:

I wonder how to address the error that I’ve quoted in the subject line?


DETAILS:

I am using R 3.4.1 to build the “oce” package, which helps with the analysis of 
oceanographic data.  It’s several years old.

Lately, when I submit the “oce” package to winbuilder using

devtools:build_win(version=“R-devel")

the message

Package has a VignetteBuilder field but no prebuilt vignette index.

is issued. I do not get this message with

devtools::build_win(version="R-release")

Using

rhub::check_for_cran()

I find that message for some machines, but not all of them.

My DESCRIPTION (https://github.com/dankelley/oce/blob/develop/DESCRIPTION) has

VignetteBuilder: knitr

and also

Suggests: knitr, rmarkdown

(amongst other suggestions).  The file 
(https://raw.githubusercontent.com/dankelley/oce/develop/vignettes/oce.Rmd)

vignettes/oce.Rnw

has YAML

---
title: "Oce"
author: "Dan Kelley and Clark Richards"
date: "`r Sys.Date()`"
output:
  rmarkdown::html_vignette:
fig_caption: yes
vignette: >
  %\VignetteIndexEntry{Oce}
  %\VignetteEngine{knitr::rmarkdown}
  \usepackage[utf8]{inputenc}
—

and in this YAML sequence, I’ve also tried replacing the second-last line with

%\VignetteEncoding{UTF-8}

I downloaded R 3.4.1 and see at lie 6703 of

src/library/tools/R/QC.R

that R wants to find a file named

build/vignette.rds

and (sure enough) that file is not in the tarball that is created with

R CMD BUILD oce

at the commandline, or with

devtools::build()

from within Rstudio.  As an aside, the latter issues a warning 

Warning in tools:::.build_packages() :
  invalid value for '--compact-vignettes', assuming “qpdf"

I’m not sure how to proceed to solve the problem I state in the second sentence 
of this email. And I’m not even positive that it *is* a problem, since it does 
not occur on all test systems.

Does anyone have any advice for further tests?

I’m sorry this email is very long — I tried to be quite clear.



SIGNATURE:


Dan E. Kelley, Professor
Oceanography Department, Dalhousie University
PO BOX 15000
Halifax, NS, Canada
B3H 4R2
dan.kel...@dal.ca








__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel