Re: [R-pkg-devel] Where do demos fit in?
Hi Neal, Re-using demos for your package tests is a great idea, and should be done more often. However, I tend to agree with Iñaki---I generally prefer vignettes to demos. I wanted to point out that you could take a similar strategy to what you suggested, but using a vignette instead of a demo. The code is slightly more complicated but seems to work. See here for an example: https://raw.githubusercontent.com/pcarbo/varbvs/test_vignette/varbvs-R/tests/testthat/test_vignette.R (Anyone, please reply if you know of a better way to implement this!) Peter On Fri, Oct 20, 2017 at 1:18 AM, Iñaki Úcarwrote: > 2017-10-20 5:42 GMT+02:00 Neal Fultz : > > A graduate student just asked me (copied below), in response to a bug I > > wrote ( > > https://github.com/DeclareDesign/estimatr/pull/38/commits/ > 99e82e253979d1307714632e9dc05d2e2c9c66df > > ): > > > > How do demos normally relate to tests and vignettes? Is the purpose > simply > >> to have manually run tests that check the things work in the global > >> environment? > > There is a good definition and description here: > http://r-pkgs.had.co.nz/misc.html > > Personally, I'm not a fan of demos, because I prefer to copy > from vignettes as I read and understand the different parts of the > problem in question. > > Iñaki > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel [[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] Help with Devtools Error
Dear Adrian, Answering this would be much easier when you have access to the code. Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance thierry.onkel...@inbo.be Kliniekstraat 25, B-1070 Brussel www.inbo.be /// To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher The plural of anecdote is not data. ~ Roger Brinner The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey /// Van 14 tot en met 19 december 2017 verhuizen we uit onze vestiging in Brussel naar het Herman Teirlinckgebouw op de site Thurn & Taxis. Vanaf dan ben je welkom op het nieuwe adres: Havenlaan 88 bus 73, 1000 Brussel. /// 2017-10-20 5:38 GMT+02:00 Adrian Cunningham: > Hello, > > > I hope that this email finds you all well. Any help with the following > error messages that I am getting when I run devtools::check() on my > package would be greatly appreciated. I think that it is a Namespace > error - but when I try to export my function, it doesn't pass the > install check of the devtools check. > > Thank you in advance! > > > * checking examples ... > ** running examples for arch 'i386' ... ERROR > Running examples in 'MDSPlot-Ex.R' failed > The error most likely occurred in: > >> base::assign(".ptime", proc.time(), pos = "CheckExEnv") >> ### Name: PlotMDS >> ### Title: PlotMDS >> ### Aliases: PlotMDS >> ### Keywords: ~kwd1 ~kwd2 >> >> ### ** Examples >> >> PlotMDS() > Error in PlotMDS() : could not find function "PlotMDS" > Execution halted > ** running examples for arch 'x64' ... ERROR > Running examples in 'MDSPlot-Ex.R' failed > The error most likely occurred in: > >> base::assign(".ptime", proc.time(), pos = "CheckExEnv") >> ### Name: PlotMDS >> ### Title: PlotMDS >> ### Aliases: PlotMDS >> ### Keywords: ~kwd1 ~kwd2 >> >> ### ** Examples >> >> PlotMDS() > Error in PlotMDS() : could not find function "PlotMDS" > Execution halted > * checking PDF version of manual ... OK > * DONE > Status: 2 ERRORs, 4 WARNINGs, 5 NOTEs > > > Best, > > *Adrian Cunningham, M.A.* > > [[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] Help with Devtools Error
Hello, I hope that this email finds you all well. Any help with the following error messages that I am getting when I run devtools::check() on my package would be greatly appreciated. I think that it is a Namespace error - but when I try to export my function, it doesn't pass the install check of the devtools check. Thank you in advance! * checking examples ... ** running examples for arch 'i386' ... ERROR Running examples in 'MDSPlot-Ex.R' failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: PlotMDS > ### Title: PlotMDS > ### Aliases: PlotMDS > ### Keywords: ~kwd1 ~kwd2 > > ### ** Examples > > PlotMDS() Error in PlotMDS() : could not find function "PlotMDS" Execution halted ** running examples for arch 'x64' ... ERROR Running examples in 'MDSPlot-Ex.R' failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: PlotMDS > ### Title: PlotMDS > ### Aliases: PlotMDS > ### Keywords: ~kwd1 ~kwd2 > > ### ** Examples > > PlotMDS() Error in PlotMDS() : could not find function "PlotMDS" Execution halted * checking PDF version of manual ... OK * DONE Status: 2 ERRORs, 4 WARNINGs, 5 NOTEs Best, *Adrian Cunningham, M.A.* [[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] Where do demos fit in?
2017-10-20 5:42 GMT+02:00 Neal Fultz: > A graduate student just asked me (copied below), in response to a bug I > wrote ( > https://github.com/DeclareDesign/estimatr/pull/38/commits/99e82e253979d1307714632e9dc05d2e2c9c66df > ): > > How do demos normally relate to tests and vignettes? Is the purpose simply >> to have manually run tests that check the things work in the global >> environment? There is a good definition and description here: http://r-pkgs.had.co.nz/misc.html Personally, I'm not a fan of demos, because I prefer to copy from vignettes as I read and understand the different parts of the problem in question. Iñaki __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel