[R-pkg-devel] R vignettes
Hello, I am doing a R CMD check on an R package I have developed. However, I keep receiving the warning below: *Files in the 'vignettes' directory but no files in 'inst/doc':* And *Files named as vignettes but with no recognized vignette engine:* I am pretty sure I have the correct YAML header for my vignettes, and also inst/docs is an older convention for vignettes that's no longer recommended. Do you have an idea of what's going wrong? I have attached my YAML header below as reference. Sincerely, Danielle *title: "title of this vignette"author: "name"output: markdown::html_vignettevignette: > %\VignetteIndexEntry{vignette title} %\VignetteEngine{knitr::markdown} %\VignetteEncoding{UTF-8}* -- Ph.D. Student Bioinformatics and Computational Biology University of Minnesota [[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] R vignettes
Hi Duncan, Thank you for your feedback! Unfortunately, when I made the changes recommended I have a new error: *trying to use CRAN without setting a mirror* And: *Error: 'col_ed' is not an exported object from 'namespace:cli'* My description file includes: *VignetteBuilder: knitrDepends: R (>= 4.0), knitrLicense: GPL-2Encoding: UTF-8Roxygen: list(rmarkdown = TRUE)RoxygenNote: 7.1.1 LazyData: trueSuggests: knitr, rmarkdown* And my vignette includes: *title: "title"author: "name"output: rmarkdown::html_vignettevignette: > %\VignetteIndexEntry{title} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8}* I'd appreciate any advice! Danielle On Wed, Apr 28, 2021 at 2:27 PM Duncan Murdoch wrote: > On 28/04/2021 2:44 p.m., Danielle Maeser wrote: > > Hello, > > > > I am doing a R CMD check on an R package I have developed. However, I > keep > > receiving the warning below: > > > > *Files in the 'vignettes' directory but no files in 'inst/doc':* > > > > And > > > > *Files named as vignettes but with no recognized vignette engine:* > > > > I am pretty sure I have the correct YAML header for my vignettes, and > also > > inst/docs is an older convention for vignettes that's no longer > > recommended. > > > > Do you have an idea of what's going wrong? I have attached my YAML header > > below as reference. > > You may be missing the line > >VignetteBuilder: knitr > > in your DESCRIPTION file. Without that, R won't know how to interpret > your vignette. > > It's also a little unusual to use > >%\VignetteEngine{knitr::markdown} > > nowadays; the more common engine is knitr::rmarkdown (but I believe both > are still supported). If you make this change you should also have > >rmarkdown::html_vignette > > as the output format. > > Finally, since a recent update of knitr, you need to make sure that > package holding the output format (i.e. markdown currently, rmarkdown if > you make the change above) is declared as a Suggested package in your > DESCRIPTION file. > > Duncan Murdoch > > > > > Sincerely, > > Danielle > > > > > > > > > > > > > > > > *title: "title of this vignette"author: "name"output: > > markdown::html_vignettevignette: > %\VignetteIndexEntry{vignette title} > > %\VignetteEngine{knitr::markdown} %\VignetteEncoding{UTF-8}* > > > > -- Ph.D. Student Bioinformatics and Computational Biology University of Minnesota [[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] R vignettes
Hi Duncan, I really appreciate your response. Unfortunately, I am still receiving the error below. If anyone has ideas, I'd appreciate it! This is the only online forum I can find that discusses the error, but I have not found it helpful: https://github.com/r-lib/cli/issues/94 * ERROR: package installation failedError: 'col_ed' is not an exported object from 'namespace:cli'Execution halted* On Wed, Apr 28, 2021 at 7:32 PM Duncan Murdoch wrote: > On 28/04/2021 4:41 p.m., Danielle Maeser wrote: > > Hi Duncan, > > > > Thank you for your feedback! > > > > Unfortunately, when I made the changes recommended I have a new error: > > > > *trying to use CRAN without setting a mirror > > That would be a result of your code. Do you call install.packages() in > one of your functions? Normally you shouldn't do that. > > > * > > > > And: > > *Error: 'col_ed' is not an exported object from 'namespace:cli'* > > Similarly, something in your code or NAMESPACE file. Do you refer to > cli::col_ed, or try to import col_ed from cli? > > > * > > * > > My description file includes: > > *VignetteBuilder: knitr > > Depends: R (>= 4.0), knitr > > License: GPL-2 > > Encoding: UTF-8 > > Roxygen: list(rmarkdown = TRUE) > > RoxygenNote: 7.1.1 > > LazyData: true > > Do you really have a data subdir in your package? You shouldn't have the > LazyData line without one. > > > Suggests: knitr, rmarkdown* > > You shouldn't list knitr in both Depends and Suggests. > > Duncan Murdoch > > > * > > * > > And my vignette includes: > > *title: "title" > > author: "name" > > output: rmarkdown::html_vignette > > vignette: > > >%\VignetteIndexEntry{title} > >%\VignetteEngine{knitr::rmarkdown} > >%\VignetteEncoding{UTF-8}* > > * > > * > > I'd appreciate any advice! > > > > Danielle > > > > On Wed, Apr 28, 2021 at 2:27 PM Duncan Murdoch > <mailto:murdoch.dun...@gmail.com>> wrote: > > > > On 28/04/2021 2:44 p.m., Danielle Maeser wrote: > > > Hello, > > > > > > I am doing a R CMD check on an R package I have developed. > > However, I keep > > > receiving the warning below: > > > > > > *Files in the 'vignettes' directory but no files in 'inst/doc':* > > > > > > And > > > > > > *Files named as vignettes but with no recognized vignette engine:* > > > > > > I am pretty sure I have the correct YAML header for my vignettes, > > and also > > > inst/docs is an older convention for vignettes that's no longer > > > recommended. > > > > > > Do you have an idea of what's going wrong? I have attached my > > YAML header > > > below as reference. > > > > You may be missing the line > > > > VignetteBuilder: knitr > > > > in your DESCRIPTION file. Without that, R won't know how to > interpret > > your vignette. > > > > It's also a little unusual to use > > > > %\VignetteEngine{knitr::markdown} > > > > nowadays; the more common engine is knitr::rmarkdown (but I believe > > both > > are still supported). If you make this change you should also have > > > > rmarkdown::html_vignette > > > > as the output format. > > > > Finally, since a recent update of knitr, you need to make sure that > > package holding the output format (i.e. markdown currently, > > rmarkdown if > > you make the change above) is declared as a Suggested package in your > > DESCRIPTION file. > > > > Duncan Murdoch > > > > > > > > Sincerely, > > > Danielle > > > > > > > > > > > > > > > > > > > > > > > > *title: "title of this vignette"author: "name"output: > > > markdown::html_vignettevignette: > %\VignetteIndexEntry{vignette > > title} > > > %\VignetteEngine{knitr::markdown} %\VignetteEncoding{UTF-8}* > > > > > > > > > > > -- > > Ph.D. Student > > Bioinformatics and Computational Biology > > University of Minnesota > > > > -- Ph.D. Student Bioinformatics and Computational Biology University of Minnesota [[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] R vignettes
Hi Gabor, My full output is below: * Error: object 'col_ed' is not exported by 'namespace:cli' Execution halted ERROR: lazy loading failed for package 'packagename' --- ERROR: package installation failedError: 'col_ed' is not an exported object from 'namespace:cli'Execution haltedExited with status 1.* Unfortunately, I can't share a full reproducible example since this package is also included in a manuscript for publication. I don't export any objects named 'col_ed' so I am quite perplexed by this error message. I'd appreciate any advice! Danielle On Thu, Apr 29, 2021 at 11:42 AM Gábor Csárdi wrote: > If you could share a reproducible example with us, and/or you could > show the full output, then we could probably help you better. > > Gabor > > On Thu, Apr 29, 2021 at 6:29 PM Danielle Maeser wrote: > > > > Hi Duncan, > > > > I really appreciate your response. Unfortunately, I am still receiving > the > > error below. > > > > If anyone has ideas, I'd appreciate it! > > > > This is the only online forum I can find that discusses the error, but I > > have not found it helpful: https://github.com/r-lib/cli/issues/94 > > > > > > > > > > * ERROR: package installation failedError: 'col_ed' is not an exported > > object from 'namespace:cli'Execution halted* > > > > On Wed, Apr 28, 2021 at 7:32 PM Duncan Murdoch > > > wrote: > > > > > On 28/04/2021 4:41 p.m., Danielle Maeser wrote: > > > > Hi Duncan, > > > > > > > > Thank you for your feedback! > > > > > > > > Unfortunately, when I made the changes recommended I have a new > error: > > > > > > > > *trying to use CRAN without setting a mirror > > > > > > That would be a result of your code. Do you call install.packages() in > > > one of your functions? Normally you shouldn't do that. > > > > > > > * > > > > > > > > And: > > > > *Error: 'col_ed' is not an exported object from 'namespace:cli'* > > > > > > Similarly, something in your code or NAMESPACE file. Do you refer to > > > cli::col_ed, or try to import col_ed from cli? > > > > > > > * > > > > * > > > > My description file includes: > > > > *VignetteBuilder: knitr > > > > Depends: R (>= 4.0), knitr > > > > License: GPL-2 > > > > Encoding: UTF-8 > > > > Roxygen: list(rmarkdown = TRUE) > > > > RoxygenNote: 7.1.1 > > > > LazyData: true > > > > > > Do you really have a data subdir in your package? You shouldn't have > the > > > LazyData line without one. > > > > > > > Suggests: knitr, rmarkdown* > > > > > > You shouldn't list knitr in both Depends and Suggests. > > > > > > Duncan Murdoch > > > > > > > * > > > > * > > > > And my vignette includes: > > > > *title: "title" > > > > author: "name" > > > > output: rmarkdown::html_vignette > > > > vignette: > > > > >%\VignetteIndexEntry{title} > > > >%\VignetteEngine{knitr::rmarkdown} > > > >%\VignetteEncoding{UTF-8}* > > > > * > > > > * > > > > I'd appreciate any advice! > > > > > > > > Danielle > > > > > > > > On Wed, Apr 28, 2021 at 2:27 PM Duncan Murdoch < > murdoch.dun...@gmail.com > > > > <mailto:murdoch.dun...@gmail.com>> wrote: > > > > > > > > On 28/04/2021 2:44 p.m., Danielle Maeser wrote: > > > > > Hello, > > > > > > > > > > I am doing a R CMD check on an R package I have developed. > > > > However, I keep > > > > > receiving the warning below: > > > > > > > > > > *Files in the 'vignettes' directory but no files in > 'inst/doc':* > > > > > > > > > > And > > > > > > > > > > *Files named as vignettes but with no recognized vignette > engine:* > > > > > > > > > > I am pretty sure I have the correct YAML header for my > vignettes, > > > > and also > > > > > inst/docs is an old
[R-pkg-devel] Error
Hello, The R CMD check passed with 0 errors and warnings, so I proceeded to submit to CRAN. However, CRAN reported 1 error (see below). If you have any insight as to what this error means, please let me know. I'm perplexed because *rtracklayer *is not a package dependency, and I'm not sure where it came from. Perhaps this is a false positive? ** installing *source* package 'oncoPredict' ... ** using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace 'rtracklayer' 1.48.0 is being loaded, but >= 1.51.5 is required Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace Execution halted ERROR: lazy loading failed for package 'oncoPredict' * removing 'd:/RCompile/CRANincoming/R-devel/lib/oncoPredict' * restoring previous 'd:/RCompile/CRANincoming/R-devel/lib/oncoPredict'* [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] What To Include In \donttest{}
Hello, Please excuse the very simple question, but I received the following message from a CRAN maintainer, and I am not sure what code to include inside of the \donttest{}. This is meant to enclose code that typically should be run, but not during package checking, and I do not have any such code. Here is the message from the CRAN maintainter: *Please add small executable examples in your Rd-files to illustrate theuse of the exported function but also enable automatic testing.Otherwise, you can also write some tests. Lengthy examples (> 5 sec) canbe wrapped in \donttest{}.* I'd appreciate any assistance you can provide. -- Ph.D. Student Bioinformatics and Computational Biology University of Minnesota [[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] What To Include In \donttest{}
Thank you for your assistance. The link is very helpful. However, I am still not sure what the difference is between the example provided with \donttest{} and a vignette. It seems both display an example of the function. For instance: the example below seems not too different from a vignette: \donttest{ name_of_function(parameters...) } Additionally, in order to set the parameters for this example in \donttest{}, it seems I must include data for this function inside of the man folder, which seems odd. I thought CRAN would ignore whatever code is provided in \donttest{} (therefore, I wouldn't have to provide the data here); however, the CRAN check complains that it does not know what these parameters are (aka object 'parameters' is not known). I'd appreciate any assistance you can provide. On Wed, May 26, 2021 at 9:37 PM Dirk Eddelbuettel wrote: > > Danielle, > > On 26 May 2021 at 21:23, Danielle Maeser wrote: > | Please excuse the very simple question, but I received the following > | message from a CRAN maintainer, and I am not sure what code to include > | inside of the \donttest{}. This is meant to enclose code that typically > | should be run, but not during package checking, and I do not have any > such > | code. > | > | Here is the message from the CRAN maintainter: > | > | *Please add small executable examples in your Rd-files to illustrate > theuse > | of the exported function but also enable automatic testing.Otherwise, you > | can also write some tests. Lengthy examples (> 5 sec) canbe wrapped in > | \donttest{}.* > | > | I'd appreciate any assistance you can provide. > > The quote contains three distinct sentences--with three distinct messages: > > 1. Please add examples, for both illustration and tests. > 2. You can also add tests directly (i.e. via directory tests/) > 3. Should examples run long, consider wrapping them in \donttest{} > > We can narrow this down to 'please add examples'. > > (Otherwise, a good trick is to search at GitHub in the (unofficial, > contributed) cran organization (mirroring CRAN) for terms you are > interested > in, here "\donttest" -- and this link claims 11k hits > https://github.com/search?q=org%3Acran+%5Cdonttest&type=code > you can probably browse a few of these to get an idea. > > Hope this helps, Dirk > > -- > https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org > -- Ph.D. Student Bioinformatics and Computational Biology University of Minnesota [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] \donttest{} and writing outputs to tempdir()
Hello, I received the following comments from a CRAN maintainer, and I don't understand why they were an issue. I'd appreciate any insight you can provide. Danielle *All your examples are wrapped in \donttest{} and therefore do not gettested.Please unwrap the examples if that is feasible and if they can beexecuted in < 5 sec for each Rd file or create additionally small toyexamples to allow automatic testing.* I don't think I can unwrap the examples in \donttest{} because they cannot be executed in <5 seconds for each Rd file, and the automatic testing of toy data is satisfied in the vignettes I provide for each function. Therefore, I am not sure what change to make here. *Please ensure that your functions do not write by default or in yourexamples/vignettes/tests in the user's home filespace (including thepackage directory and getwd()). This is not allowed by CRAN policies.In your examples/vignettes/tests you can write to tempdir().* Additionally, all of my vignettes write the output of each function to tempdir(). Therefore, I am not sure why this is a problem. -- Ph.D. Student Bioinformatics and Computational Biology University of Minnesota [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Building Vignettes
Hello, I have a question concerning the oncoPredict R package. I noticed this package requires obtaining the .tar.gz file, then selecting the option to install, and then 'Build Source Package' inorder to build the vignettes. However, this isn't always the case with other packages. These require installing from the .tar.gz file, but they don't also require building the source package. Why is building the source package required in some cases but not in others? Any assistance would be appreciated. Danielle [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Packages required but not available
Hello, I received the following output from my package, oncoPredict. However, I don't understand how to correct this error. I've tested the advice here: https://stackoverflow.com/questions/14358814/error-in-r-cmd-check-packages-required-but-not-available without success. Any thoughts as to how this error can be fixed? Danielle Maeser *Version: 0.1Check: package dependenciesResult: ERRORPackages required but not available: 'org.Hs.eg.db', 'TxDb.Hsapiens.UCSC.hg19.knownGene', 'maftools', 'TCGAbiolinks'* * See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’* *manual.Flavor: r-release-macos-x86_64 <https://www.r-project.org/nosvn/R.check/r-release-macos-x86_64/oncoPredict-00check.html>* -- Ph.D. Student Bioinformatics and Computational Biology University of Minnesota [[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] Packages required but not available
Hi David, Yes. I did recently upgrade R. On Sat, Sep 11, 2021 at 4:28 PM wrote: > Danielle: > > Did you recently upgrade to R 4.1.1? > > David > > > -Original Message- > From: R-package-devel On Behalf > Of Danielle Maeser via R-package-devel > Sent: Saturday, September 11, 2021 5:10 PM > To: R Package Devel > Subject: [R-pkg-devel] Packages required but not available > > Hello, > > I received the following output from my package, oncoPredict. > > However, I don't understand how to correct this error. I've tested the > advice here: > > https://stackoverflow.com/questions/14358814/error-in-r-cmd-check-packages-required-but-not-available > without success. > > Any thoughts as to how this error can be fixed? > > Danielle Maeser > > > > > > > *Version: 0.1Check: package dependenciesResult: ERRORPackages required > but not available: 'org.Hs.eg.db', 'TxDb.Hsapiens.UCSC.hg19.knownGene', > 'maftools', 'TCGAbiolinks'* > * See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’* > > *manual.Flavor: r-release-macos-x86_64 > < > https://www.r-project.org/nosvn/R.check/r-release-macos-x86_64/oncoPredict-00check.html > >* > -- > Ph.D. Student > Bioinformatics and Computational Biology University of Minnesota > > [[alternative HTML version deleted]] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > > -- Ph.D. Student Bioinformatics and Computational Biology University of Minnesota [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel