Re: [R-pkg-devel] (no subject)

2018-01-10 Thread Georgi Boshnakov
Have you put dplyr in 'Suggests'? This should do.

Note that R CMD check runs the code in vignettes twice - once during building 
and then again the tangled R code file.
So the error may come from the second run. You can check this locally by 
telling knitr not to clean up after building the vignette and inspecting the 
generated R file.

I think that in recent versions of knitr there is an option to prevent 
generating the R file in the first place, so this may solve the problem.

Georgi

--
Dr Georgi Boshnakov   tel: (+44) (0)161 306 3684
School of Mathematics fax: (+44) (0)161 306 3669
Alan Turing Building 1.125
The University of Manchester  email: georgi.boshna...@manchester.ac.uk
Oxford Road
Manchester M13 9PL
UK


-Original Message-
From: R-package-devel [mailto:r-package-devel-boun...@r-project.org] On Behalf 
Of Tim Keitt
Sent: 10 January 2018 05:49
To: R Package Devel
Subject: [R-pkg-devel] (no subject)

I'm seeing:

* checking re-building of vignette outputs ... [3s] WARNING
> Error in re-building vignettes:
> ...
> Quitting from lines 24-60 (strider.Rmd)
> Error: processing vignette 'strider.Rmd' failed with diagnostics:
> package 'dplyr' is not installed for 'arch = x64'
> Execution halted



I'm a little confused because my vignette avoids loading any packages that are 
not available. Is this because the "eval" option is not available in the 
version of knitr used by CRAN?

Here's the vignette code:

>
> ---
> title: "The Strider Package"
> author: "Timothy H. Keitt"
> date: "`r Sys.Date()`"
> output: rmarkdown::html_vignette
> vignette: >
>   %\VignetteIndexEntry{Vignette Title}
>   %\VignetteEngine{knitr::rmarkdown}
>   %\VignetteEncoding{UTF-8}
> ---
> ```{r include=FALSE}
> has_packages = all(c("dplyr", "ggplot2", "microbenchmark") %in%
> rownames(installed.packages()))
> not_has_packages = !has_packages
> ```
> ```{r echo=FALSE, eval=not_has_packages}
> cat("Error: You must install dplyr, ggplot2 and microbenchmark to run 
> the code in this vignette.") ``` ```{r include=FALSE, message=FALSE, 
> warning=FALSE, eval=has_packages}
> library(dplyr)
> library(ggplot2)
> library(microbenchmark)
> ...


This works fine on my computer even if I uninstall dplyr, etc. But it appears 
that when CRAN tries to rebuild the vignette, the "eval" flag is ignored?

Tricky to reproduce as the exact code used to regenerate the vignette is not 
part of the output.

THK


http://www.keittlab.org/

[[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] Resize PDF Vignettes in Source Package

2018-01-10 Thread Marius PASCARIU
Dear all,

I want to add PDF vignettes to my package created with rmarkdown. The PDFs are 
generated without problems. If I submit the package to CRAN I would a warning 
telling me that the files are too large (see below):

checking sizes of PDF files under 'inst/doc' ... WARNING
 'gs+qpdf' made some significant size reductions:
compacted 'Manual.pdf' from 370Kb to 116Kb
 consider running tools::compactPDF(gs_quality = "ebook") on these files

I do run `tools::compactPDF(gs_quality = "ebook�)` and the size of the PDF is 
indeed reduced to 116Kb. Now, if I build again the source package using `R CMD 
build ` the vignette is reconstructed at its original size 
(370Kb). However, If I build the package using `R CMD build  
--no-build-vignettes` in order to keep the small PDF, the check would throw me 
the following NOTE:

Package has a VignetteBuilder field but no prebuilt vignette index.

Any ideas how can I include the compacted PDFs in the souce package and have a 
vignette index in the same time?

Thanks!

Cordially,
Marius Pascariu

[[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] Resize PDF Vignettes in Source Package

2018-01-10 Thread Duncan Murdoch

On 10/01/2018 2:08 AM, Marius PASCARIU wrote:

Dear all,

I want to add PDF vignettes to my package created with rmarkdown. The PDFs are 
generated without problems. If I submit the package to CRAN I would a warning 
telling me that the files are too large (see below):

checking sizes of PDF files under 'inst/doc' ... WARNING
  'gs+qpdf' made some significant size reductions:
 compacted 'Manual.pdf' from 370Kb to 116Kb
  consider running tools::compactPDF(gs_quality = "ebook") on these files

I do run `tools::compactPDF(gs_quality = "ebook�)` and the size of the PDF is indeed 
reduced to 116Kb. Now, if I build again the source package using `R CMD build 
` the vignette is reconstructed at its original size (370Kb). However, If I 
build the package using `R CMD build  --no-build-vignettes` in order to keep 
the small PDF, the check would throw me the following NOTE:

Package has a VignetteBuilder field but no prebuilt vignette index.

Any ideas how can I include the compacted PDFs in the souce package and have a 
vignette index in the same time?




When you build the tarball, use the --compact-vignettes option.

Duncan Murdoch

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

[R-pkg-devel] package dependencies are not available on some check severs

2018-01-10 Thread Miao YU
Hi everyone,

I want to update my package (enviGCMS) and find it can’t pass the check since 
some imported functions are not available.

Here is the check log: 


Those functions are all from imported bioc packages and I have used biocViews: 
in DESCRIPTION . I also found current version of enviGCMS has some problems 
related to certain check flavor 
(https://CRAN.R-project.org/web/checks/check_results_enviGCMS.html).

The main issue would be that the check server just do not have the packages 
which is actually available on Bioc server such as 
xcms(http://bioconductor.org/packages/release/bioc/html/xcms.html), 
MSnbase(http://bioconductor.org/packages/release/bioc/html/MSnbase.html) and 
faahKO(https://bioconductor.org/packages/release/data/experiment/html/faahKO.html)

As far as I could see, all those packages show a warning or error status on 
bioc build. Maybe the check servers on CRAN just skip those packages. Could I 
just import certain functions since the waining and error did not affect my 
imported functions?

Any suggestions about it? Or I should wait until those imported package passed 
the check and then submit again?

Thanks,

Miao


signature.asc
Description: Message signed with OpenPGP
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] package dependencies are not available on some check severs

2018-01-10 Thread Duncan Murdoch

On 10/01/2018 11:29 AM, Miao YU wrote:

Hi everyone,

I want to update my package (enviGCMS) and find it can’t pass the check since 
some imported functions are not available.

Here is the check log: 


Those functions are all from imported bioc packages and I have used biocViews: 
in DESCRIPTION . I also found current version of enviGCMS has some problems 
related to certain check flavor 
(https://CRAN.R-project.org/web/checks/check_results_enviGCMS.html).

The main issue would be that the check server just do not have the packages 
which is actually available on Bioc server such as 
xcms(http://bioconductor.org/packages/release/bioc/html/xcms.html), 
MSnbase(http://bioconductor.org/packages/release/bioc/html/MSnbase.html) and 
faahKO(https://bioconductor.org/packages/release/data/experiment/html/faahKO.html)


Generally the checks are done against R-devel, so you need to be looking 
for packages in the 3.7 version of Bioc.  This page:


http://bioconductor.org/checkResults/devel/bioc-LATEST/

shows errors in xcms and MSnbase, and there's no sign of faahKO.



As far as I could see, all those packages show a warning or error status on 
bioc build. Maybe the check servers on CRAN just skip those packages. Could I 
just import certain functions since the waining and error did not affect my 
imported functions?


No, if a package has errors it won't be available at all.


Any suggestions about it? Or I should wait until those imported package passed 
the check and then submit again?


The other choice is to find alternate sources of the functions you need. 
 If they are small and self-contained, you might be able to copy the 
source out of those packages and into yours.  If you do that, be sure to 
give proper credit to the authors.


Duncan Murdoch

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

Re: [R-pkg-devel] package dependencies are not available on some check severs

2018-01-10 Thread Miao YU
Thanks! I checked the error and found the original error came from another 
package(mzR) which are imported by xcms and MSnbase. Unfortunately, the 
functions I needed are not so self-contained and also rely on mzR in some 
certain cases.

Good news is that someone has recently raised same check error issue on 
Github(https://github.com/sneumann/mzR/issues/143) and the author has shown a 
solution for this issue. Maybe a few days later mzR could be updated on Bioc 
without error and then I will try to submit my package again.

Miao

> On Jan 10, 2018, at 12:38 PM, Duncan Murdoch  wrote:
> 
> On 10/01/2018 11:29 AM, Miao YU wrote:
>> Hi everyone,
>> I want to update my package (enviGCMS) and find it can’t pass the check 
>> since some imported functions are not available.
>> Here is the check log: 
>> 
>> Those functions are all from imported bioc packages and I have used 
>> biocViews: in DESCRIPTION . I also found current version of enviGCMS has 
>> some problems related to certain check flavor 
>> (https://CRAN.R-project.org/web/checks/check_results_enviGCMS.html).
>> The main issue would be that the check server just do not have the packages 
>> which is actually available on Bioc server such as 
>> xcms(http://bioconductor.org/packages/release/bioc/html/xcms.html), 
>> MSnbase(http://bioconductor.org/packages/release/bioc/html/MSnbase.html) and 
>> faahKO(https://bioconductor.org/packages/release/data/experiment/html/faahKO.html)
> 
> Generally the checks are done against R-devel, so you need to be looking for 
> packages in the 3.7 version of Bioc.  This page:
> 
> http://bioconductor.org/checkResults/devel/bioc-LATEST/
> 
> shows errors in xcms and MSnbase, and there's no sign of faahKO.
> 
>> As far as I could see, all those packages show a warning or error status on 
>> bioc build. Maybe the check servers on CRAN just skip those packages. Could 
>> I just import certain functions since the waining and error did not affect 
>> my imported functions?
> 
> No, if a package has errors it won't be available at all.
>> Any suggestions about it? Or I should wait until those imported package 
>> passed the check and then submit again?
> 
> The other choice is to find alternate sources of the functions you need.  If 
> they are small and self-contained, you might be able to copy the source out 
> of those packages and into yours.  If you do that, be sure to give proper 
> credit to the authors.
> 
> Duncan Murdoch


signature.asc
Description: Message signed with OpenPGP
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] Fwd: [CRAN-pretest-archived] CRAN submission simpleroptions 0.2.0

2018-01-10 Thread Luca Cerone
Hi,
first of all thanks Uwe for your time.

About the package writing a file in the home directory, I have a doubt: the
package's aim is to be able to setup configuration files without too much
effort.
Usually the home is a good place to put such file (for example rstudio
creates .rstudio-desktop in your home...).
Is this because the file is created from a vignette, or is it going to be
an issue?
For the vignette, what if I change the location of the file to a temporary
directory? Would that help pass the check?

As it was pointed to me, running devtools::check() is not enough, and in
fact after building the package and running R CMD build on the .tar.zip
archive
I still get errors (I fixed the title and the description, but apparently
wasn't enough).

Below is the log message I get, I think I have somehow to change the
documentation because latex can't compile it (although I have no idea why
it can't)
and I don't properly understand the complain about the imports.

I don't include them in the NAMESPACE because I call my functions using the
form package::function (e.g. R6::R6Class), which is what I thought is
considered as good practice.

Could you give me some advice on how to fix this note?

Thanks a lot for the help, here is the log I of the errors:

cat simpleroptions.Rcheck/00check.log
* using log directory
‘/home/luca/Documents/r-projects/simpleroptions.Rcheck’
* using R version 3.4.3 (2017-11-30)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘simpleroptions/DESCRIPTION’ ... OK
* this is package ‘simpleroptions’ version ‘0.2.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘simpleroptions’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ...
OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... NOTE
Namespaces in Imports field not imported from:
  ‘R6’ ‘jsonlite’ ‘knitr’ ‘readr’
  All declared Imports should be used.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... NONE
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
* checking PDF version of manual without hyperrefs or index ... OK
* DONE
Status: 1 WARNING, 1 NOTE


On Tue, Jan 9, 2018 at 9:33 AM, Uwe Ligges 
wrote:

>
>
> On 09.01.2018 09:22, Luca Cerone wrote:
>
>> Dear all,
>> I have submitted my first R package to CRAN and I have received the email
>> below back.
>>
>> If I understood the log message correctly, to fix the issues is fairly
>> simple:
>> - correct the Title using the Title Case suggestion
>> - change a bit the description so that "simpleroptions" is not the first
>> word in the DESCRIPTION.
>>
>> Also the mispelled word is the name of my package so I guess that is OK,
>> isn't it >
>> Before re-submitting and wasting CRAN reviewers time I would like to know
>> that with the changes above the package would be good for acceptance.
>>
>
> We see:
>
> File 'LICENSE':
>   MIT License
>
>   Copyright (c) 2017 Luca Cerone
>
>   Permission ..
>
>
> Please only submit the CRAN template for the MIT licernse.
>
> Possibly mis-spelled words in DESCRIPTION:

Re: [R-pkg-devel] Resize PDF Vignettes in Source Package

2018-01-10 Thread Marius PASCARIU
--compact-vignettes alone did not work.
--compact-vignettes=gs+qpdf did the job.

Thanks.
Marius Pascariu

On 11 Jan 2018, at 00:56, Duncan Murdoch  wrote:

On 10/01/2018 2:08 AM, Marius PASCARIU wrote:
Dear all,
I want to add PDF vignettes to my package created with rmarkdown. The PDFs are 
generated without problems. If I submit the package to CRAN I would a warning 
telling me that the files are too large (see below):
checking sizes of PDF files under 'inst/doc' ... WARNING
 'gs+qpdf' made some significant size reductions:
compacted 'Manual.pdf' from 370Kb to 116Kb
 consider running tools::compactPDF(gs_quality = "ebook") on these files
I do run `tools::compactPDF(gs_quality = "ebook�)` and the size of the PDF is 
indeed reduced to 116Kb. Now, if I build again the source package using `R CMD 
build ` the vignette is reconstructed at its original size 
(370Kb). However, If I build the package using `R CMD build  
--no-build-vignettes` in order to keep the small PDF, the check would throw me 
the following NOTE:
Package has a VignetteBuilder field but no prebuilt vignette index.
Any ideas how can I include the compacted PDFs in the souce package and have a 
vignette index in the same time?


When you build the tarball, use the --compact-vignettes option.

Duncan Murdoch


[[alternative HTML version deleted]]

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