Re: [R-pkg-devel] How to reduce examples in a package that takes more than 5 seconds to run?

2022-12-16 Thread Ismail Otoakhia
Thanks, everyone. From the ideas shared, I adopted the following on the .rd
files:
\examples{
\dontrun{
...
...
...
}
}
The "..." are the examples which take more than 5 seconds to run. I hope
this resolved the CRAN team's request.


E. I Otoakhia


On Thu, Dec 15, 2022 at 4:26 PM Spencer Graves <
spencer.gra...@effectivedefense.org> wrote:

>
>
> On 12/15/22 9:02 AM, Ben Bolker wrote:
> >
> >
> > On 2022-12-15 9:57 a.m., Brian G. Peterson wrote:
> >> On 12/15/22 08:34, Ismail Otoakhia wrote:
> >>> The R package 'ardl.nardl' has some examples that take more than 5
> >>> seconds
> >>> to run. I was advised by the CRAN team to reduce the run time to less
> >>> than
> >>> 5 seconds.
> >>>
> >>> How can this be achieved?
> >>
> >> - you can lower the amount of data in the example
> >>
> >> - you can use a faster method than your default method
> >>
> >> - you can wrap the example in a dontrun tag so it will not run during
> >> checking
> >>
> >
> >If your example involves something like a fitted model object that
> > takes a long time to compute, you can pre-compute the model fit and
> > store the object in an inst/testdata directory, then use something like
> >
> > fitted_model <- readRDS(system.file("testdata", "my_example.rds",
> > package = "mypackage"))
> >
> > to retrieve it
>
>
>   The "sos" package includes a function "CRAN", which is used for
> that
> purpose.  The examples section in "findfn.Rd" includes the following:
>
>
> # Skip these tests on CRAN,
> # because they take more than 5 seconds
> if(!CRAN()){
> ...
> }
>
>
>   I know that some on this list do not like this construct, but it
> has
> helped me manage this problem for several years.  NOTE:  This CRAN
> function is NOT maintained by anyone on CRAN, so it is NOT guaranteed to
> work.  However, the "sos" package is currently on CRAN, and I have not
> seen an email asking me to avoid it ;-)
>
>
> https://github.com/sbgraves237/sos/blob/master/man/findFn.Rd
>
>
>   Hope this helps.
>   Spencer Graves
> >
> >> __
> >> 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
>

[[alternative HTML version deleted]]

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


[R-pkg-devel] Question on Description/Citing Feedback

2022-12-16 Thread Michael Topper
Hello all,

I just received feedback from my first CRAN submission. Currently, I am a
little confused as to one point of the feedback which reads:









*If there are references describing the methods in your package, pleaseadd
these in the description field of your DESCRIPTION file in the formauthors
(year) authors (year) authors (year, ISBN:...)or if
those are not available: with no space after 'doi:', 'arXiv:',
'https:' and angle brackets forauto-linking. (If you want to add a title as
well please put it inquotes: "Title")*

For some background:

   - My package is named panelsummary. The link to the github can be found
   here: https://github.com/michaeltopper1/panelsummary
   - My package inherits some documentation of some of the parameters from
   the package modelsummary
   . In particular, two
   of my functions (panelsummary::panelsummary and
   panelsummary::panelsummary_raw) share a couple of the same arguments as
   modelsummary::modelsummary. I used roxygen2 (@inherits) to generate
   documentation for the shared arguments.
   - Because of this inherited documentation, I have also included the
   author/creator of modelsummary as a copyright holder in the DESCRIPTION
   file with a comment.


My confusion:

   - I understand the Description portion of the DESCRIPTION file needs to
   be edited, but I'm a little confused as to what I am supposed to add and
   how. Do I need to include a citation to the published paper of
   modelsummary and describe where I use the documentation? Modelsummary was
   published in the journal of statistical software and the following was
   included on the modelsummary release information:
  - Arel-Bundock, Vincent (2022). “modelsummary: Data and Model
  Summaries in R.” Journal of Statistical Software, 103(1), 1-23.
  doi:10.18637/jss.v103.i01 https://doi.org/10.18637/jss.v103.i01.’

What would be most helpful:

   - If there is any other Description file from another package that
   contains an example of what to do in such a situation, this would be
   greatly appreciated!

Please let me know if any additional details are needed, and thank you so
much for your help/time!

Michael

[[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] Question on Description/Citing Feedback

2022-12-16 Thread Ivan Krylov
On Fri, 16 Dec 2022 10:06:44 -0800
Michael Topper  wrote:

>- I understand the Description portion of the DESCRIPTION file
> needs to be edited, but I'm a little confused as to what I am
> supposed to add and how. Do I need to include a citation to the
> published paper of modelsummary

Yes, exactly.

>   - Arel-Bundock, Vincent (2022). “modelsummary: Data and Model
>   Summaries in R.” Journal of Statistical Software, 103(1), 1-23.
>   doi:10.18637/jss.v103.i01
> https://doi.org/10.18637/jss.v103.i01.’

Translating that in the "authors (year) " format, we get:

  Arel-Bundock, V. (2022) 

Use this form to reference the paper in the Description: field of your
DESCRIPTION.

> What would be most helpful:
> 
>- If there is any other Description file from another package that
>contains an example of what to do in such a situation, this would
> be greatly appreciated!

My own package received the same feedback on initial submission as
yours, so here's what I did: https://CRAN.R-project.org/package=cmocean

When you include documentation from a different package into one of your
own, mentioning the documentation authors in the Authors@R: field is
the right thing to do. If you want to be 100% sure, check whether parts
of documentation you're including could have been authored by other
people mentioned as contributors to modelsummary.

Hope this helps!

>   [[alternative HTML version deleted]]

Here's how we see your e-mail:
https://stat.ethz.ch/pipermail/r-package-devel/2022q4/008746.html

Unfortunately, when you compose your messages in HTML, we only get the
plain text version automatically generated by your mailer, which may be
not a perfect representation of your message. Composing your messages to
R-package-devel in plain text will prevent them from being mangled.

-- 
Best regards,
Ivan

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


Re: [R-pkg-devel] Question on Description/Citing Feedback

2022-12-16 Thread Jeff Newmiller
Isn't the whole purpose of creating a new package to introduce new algorithms? 
That there is a history related to the modelsummary package is fine, but I 
think the request is for references to published discussion of why modelsummary 
needed to be augmented with new algorithms. It seems to me that other than 
mentioning that this package augments modelsummary that issue is moot... rather 
you need to expand on why this package is relevant.

On December 16, 2022 10:06:44 AM PST, Michael Topper  
wrote:
>Hello all,
>
>I just received feedback from my first CRAN submission. Currently, I am a
>little confused as to one point of the feedback which reads:
>
>
>
>
>
>
>
>
>
>*If there are references describing the methods in your package, pleaseadd
>these in the description field of your DESCRIPTION file in the formauthors
>(year) authors (year) authors (year, ISBN:...)or if
>those are not available: with no space after 'doi:', 'arXiv:',
>'https:' and angle brackets forauto-linking. (If you want to add a title as
>well please put it inquotes: "Title")*
>
>For some background:
>
>   - My package is named panelsummary. The link to the github can be found
>   here: https://github.com/michaeltopper1/panelsummary
>   - My package inherits some documentation of some of the parameters from
>   the package modelsummary
>   . In particular, two
>   of my functions (panelsummary::panelsummary and
>   panelsummary::panelsummary_raw) share a couple of the same arguments as
>   modelsummary::modelsummary. I used roxygen2 (@inherits) to generate
>   documentation for the shared arguments.
>   - Because of this inherited documentation, I have also included the
>   author/creator of modelsummary as a copyright holder in the DESCRIPTION
>   file with a comment.
>
>
>My confusion:
>
>   - I understand the Description portion of the DESCRIPTION file needs to
>   be edited, but I'm a little confused as to what I am supposed to add and
>   how. Do I need to include a citation to the published paper of
>   modelsummary and describe where I use the documentation? Modelsummary was
>   published in the journal of statistical software and the following was
>   included on the modelsummary release information:
>  - Arel-Bundock, Vincent (2022). “modelsummary: Data and Model
>  Summaries in R.” Journal of Statistical Software, 103(1), 1-23.
>  doi:10.18637/jss.v103.i01 https://doi.org/10.18637/jss.v103.i01.’
>
>What would be most helpful:
>
>   - If there is any other Description file from another package that
>   contains an example of what to do in such a situation, this would be
>   greatly appreciated!
>
>Please let me know if any additional details are needed, and thank you so
>much for your help/time!
>
>Michael
>
>   [[alternative HTML version deleted]]
>
>__
>R-package-devel@r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
Sent from my phone. Please excuse my brevity.

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


[R-pkg-devel] checking sizes of PDF files under ‘inst/doc’ ... WARNING

2022-12-16 Thread EcoC2S - Irucka Embry
While running R CMD check on my iemisc package, I receive the following 
warning:


* checking sizes of PDF files under ‘inst/doc’ ... WARNING
  ‘gs+qpdf’ made some significant size reductions:
 compacted ‘Comparing_Manningtrap.pdf’ from 766Kb to 450Kb
  consider running tools::compactPDF(gs_quality = "ebook") on these 
files


Is there a method to have the reduction of the PDF vignettes happen 
during the R CMD check process?


I don't build the vignettes independently of the check process.

Thank you in advance.

Irucka Embry


--
--
No fear, Only Love! / ¡No temas, solamente amor!
-Irucka Ajani Embry, 15 March 2020

Family Partners:
http://www.sustainlex.org/
https://www.schoolingsolutions.com/

---

The business collaboration between EConsulting (tm)
[https://www.econsultingllc.org/] and EcoC^2S, is Getting Back to 
Nature.


Getting Back to Nature LocalHarvest --
https://www.localharvest.org/getting-back-to-nature-M73453
Getting Back to Nature -- https://www.gettingback2nature.farm/

-- Irucka and his twin brother, Obiora, are featured in the Middle
Tennessee Local Table Magazine Annual issue. The article discusses their
family farm history and the current work that they are doing under 
Getting
Back to Nature. The full magazine can be found here [the article begins 
on

page 18 of the PDF document]:

https://media.gettingback2nature.farm/pdf/LocalTable_ANNUAL_2020_lo_res.pdf

-- Obiora and Irucka were interviewed separately in early 2020 for the
Natural Resources Defense Council's (NRDC) "Regenerative Agriculture: 
Farm
Policy for the 21st Century: Policy Recommendations to Advance 
Regenerative

Agriculture" report written By Arohi Sharma, Lara Bryant, and Ellen Lee.
The PDF report is available below:

https://www.nrdc.org/sites/default/files/regenerative-agriculture-farm-policy-21st-century-report.pdf

EcoC2S -- https://www.ecoccs.com/
Principal, Irucka Embry, EIT

Services:
Growing Food
Healthy Living Mentor
Data Analysis with R
R Training
Chemistry and Mathematics Tutoring
Free/Libre and Open Source Software (FLOSS) Consultation

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


Re: [R-pkg-devel] checking sizes of PDF files under‘inst/doc’ ... WARNING

2022-12-16 Thread Dirk Eddelbuettel


On 16 December 2022 at 20:30, EcoC2S - Irucka Embry wrote:
| While running R CMD check on my iemisc package, I receive the following 
| warning:
| 
| * checking sizes of PDF files under ‘inst/doc’ ... WARNING
|‘gs+qpdf’ made some significant size reductions:
|   compacted ‘Comparing_Manningtrap.pdf’ from 766Kb to 450Kb
|consider running tools::compactPDF(gs_quality = "ebook") on these 
| files
| 
| Is there a method to have the reduction of the PDF vignettes happen 
| during the R CMD check process?

You can use '--compact-vignettes=both' when invoking R CMD build. I happen to
use the example script 'build.r' from the `littler` package I wrote which
does that for me (by calling 'tools:::.build_packages()' with that argument).

Hth,  Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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