[Rd] Suggested Patch: Adding commas to list of packages after R CMD check

Duncan Murdoch murdoch@dunc@n @ending from gm@il@com
Tue Sep 18 22:23:47 CEST 2018


On 18/09/2018 2:16 PM, Marcel Ramos wrote:
> Dear R-devs,
> 
> 
> Scenario:
> 
> When checking a package via `R CMD check package_tar.ball`, required / suggested packages may be missing. R subsequently returns a list of packages that are missing (delimited by spaces).
> 
> Example:
> 
> ```
> R CMD check glmSparseNet_0.99.13.tar.gz
> * using log directory '/home/ubuntu/Bioconductor/glmSparseNet.Rcheck'
> * using R Under development (unstable) (2018-06-06 r74855)
> * using platform: x86_64-pc-linux-gnu (64-bit)
> * using session charset: UTF-8
> * checking for file 'glmSparseNet/DESCRIPTION' ... OK
> * checking extension type ... Package
> * this is package 'glmSparseNet' version '0.99.13'
> * package encoding: UTF-8
> * checking package namespace information ... OK
> * checking package dependencies ... ERROR
> Packages required but not available:
>    'MultiAssayExperiment' 'glmnet' 'SummarizedExperiment' 'STRINGdb'
>    'biomaRt' 'futile.logger' 'sparsebn' 'sparsebnUtils' 'forcats'
>    'dplyr' 'readr' 'ggplot2' 'ggfortify' 'reshape2' 'rlang' 'loose.rock'
> 
> Packages suggested but not available:
>    'testthat' 'knitr' 'rmarkdown' 'survcomp' 'pROC' 'devtools'
>    'VennDiagram' 'BiocStyle' 'curatedTCGAData'
> 
> VignetteBuilder package required for checking but not installed: 'knitr'
> 
> The suggested packages are required for a complete check.
> Checking can be attempted without them by setting the environment
> variable _R_CHECK_FORCE_SUGGESTS_ to a false value.
> 
> See section 'The DESCRIPTION file' in the 'Writing R Extensions'
> manual.
> * DONE
> 
> Status: 1 ERROR
> See
>    '/home/ubuntu/Bioconductor/glmSparseNet.Rcheck/00check.log'
> for details.
> ```
> 
> 
> Suggested Patch:
> 
> To return a list of missing dependencies delimited by a comma and a space (", ") so to make it easier for the user to copy and paste this list.
> This would be especially helpful when the list of missing dependencies is extensive.

This seems like a reasonable suggestion, considering how easy it is to do.

Another suggestion would be to (optionally) automatically install 
missing dependencies.  I think the devtools::install_deps function will 
do that.  (I don't use it, I have a homebrewed function for that purpose.)

Duncan Murdoch


> 
> 
> Example output:
> 
> ```
> R CMD check glmSparseNet_0.99.13.tar.gz
> * using log directory '/home/ubuntu/Bioconductor/glmSparseNet.Rcheck'
> * using R Under development (unstable) (2018-09-18 r75322)
> * using platform: x86_64-pc-linux-gnu (64-bit)
> * using session charset: UTF-8
> * checking for file 'glmSparseNet/DESCRIPTION' ... OK
> * checking extension type ... Package
> * this is package 'glmSparseNet' version '0.99.13'
> * package encoding: UTF-8
> * checking package namespace information ... OK
> * checking package dependencies ... ERROR
> Packages required but not available:
>    'MultiAssayExperiment', 'glmnet', 'SummarizedExperiment', 'STRINGdb',
>    'biomaRt', 'futile.logger', 'sparsebn', 'sparsebnUtils', 'forcats',
>    'dplyr', 'readr', 'ggplot2', 'ggfortify', 'reshape2', 'stringr',
>    'rlang', 'loose.rock'
> 
> Packages suggested but not available:
>    'testthat', 'knitr', 'rmarkdown', 'survcomp', 'pROC', 'devtools',
>    'roxygen2', 'VennDiagram', 'BiocStyle', 'curatedTCGAData'
> 
> VignetteBuilder package required for checking but not installed: 'knitr'
> 
> The suggested packages are required for a complete check.
> Checking can be attempted without them by setting the environment
> variable _R_CHECK_FORCE_SUGGESTS_ to a false value.
> 
> See section 'The DESCRIPTION file' in the 'Writing R Extensions'
> manual.
> * DONE
> 
> Status: 1 ERROR
> See
>    '/home/ubuntu/Bioconductor/glmSparseNet.Rcheck/00check.log'
> for details.
> ```
> 
> 
> svn diff:
> 
> 
> Index: src/library/tools/R/QC.R
> ===================================================================
> --- src/library/tools/R/QC.R    (revision 75322)
> +++ src/library/tools/R/QC.R    (working copy)
> @@ -8536,13 +8536,13 @@
>   .pretty_format <-
>   function(x)
>   {
> -    strwrap(paste(sQuote(x), collapse = " "),
> +    strwrap(paste(sQuote(x), collapse = ", "),
>               indent = 2L, exdent = 2L)
>   }
>   .pretty_format2 <-
>   function(msg, x)
>   {
> -    xx <- strwrap(paste(sQuote(x), collapse = " "), exdent = 2L)
> +    xx <- strwrap(paste(sQuote(x), collapse = ", "), exdent = 2L)
>       if (length(xx) > 1L || nchar(msg) + nchar(xx) + 1L > 75L)
>           c(msg, .pretty_format(x))
>       else paste(msg, xx)
> 
> 
> 
> PS. I would also advocate for setting `useFancyQuotes` to `FALSE` by default but it would be better to get more
> input from the community.
> 
> Thanks!
> 
> 
> Best regards,
> 
> Marcel
> 
> --
> Marcel Ramos
> Bioconductor Core Team
> Roswell Park Comprehensive Care Center
> Dept. of Biostatistics & Bioinformatics
> Elm & Carlton Streets
> Buffalo, New York 14263
> 
> 
> This email message may contain legally privileged and/or confidential information.  If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited.  If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list