[R-pkg-devel] Examples with CPU time is greater than elapsed time.

2022-11-05 Thread Jiaming Yuan
Hi all, I tried to submit an update to the xgboost package but didn't pass the pre-tests with the following note (solved the other one, but this one is a bit confusing): ``` Flavor: r-devel-linux-x86_64-debian-gcc Check: examples, Result: NOTE Examples with CPU time > 2.5 times elapsed time

Re: [R-pkg-devel] Examples with CPU time is greater than elapsed time.

2022-11-05 Thread Henrik Bengtsson
I think it's because it suggests that the package uses more than 250% of CPU load on average, which suggests it runs in parallel with more than two parallel workers, which is the upper limit in the CRAN Policies (https://cran.r-project.org/web/packages/policies.html); "If running a package uses mu

Re: [R-pkg-devel] Examples with CPU time is greater than elapsed time.

2022-11-05 Thread Ivan Krylov
On Sat, 5 Nov 2022 22:41:45 +0800 Jiaming Yuan wrote: >Examples with CPU time > 2.5 times elapsed time > I'm wondering what the note is trying to tell me and how can I > resolve it with confidence. Henrik Bengtsson already gave a good explanation of the problem. Not sure what exactly is th

[R-pkg-devel] Writing to users config directory for CRAN package

2022-11-05 Thread David Hugh-Jones
Hi, I'm considering submitting the package onetime ( https://github.com/hughjonesd/onetime/) to CRAN. Onetime has functions for showing a message or warning only once (ever per user). It does this by writing to a file in the user's configuration directory, as reported by rappdirs::user_config_dir

Re: [R-pkg-devel] Writing to users config directory for CRAN package

2022-11-05 Thread Dirk Eddelbuettel
On 5 November 2022 at 19:32, David Hugh-Jones wrote: | I'm considering submitting the package onetime ( | https://github.com/hughjonesd/onetime/) to CRAN. | | Onetime has functions for showing a message or warning only once (ever per | user). It does this by writing to a file in the user's confi

Re: [R-pkg-devel] Examples with CPU time is greater than elapsed time.

2022-11-05 Thread Jiaming Yuan
Thank you for the detailed explanation, that's really helpful! On 11/6/22 02:22, Henrik Bengtsson wrote: I think it's because it suggests that the package uses more than 250% of CPU load on average, which suggests it runs in parallel with more than two parallel workers, which is the upper limit

Re: [R-pkg-devel] Examples with CPU time is greater than elapsed time.

2022-11-05 Thread Jiaming Yuan
Thank you for the suggestions! I think I will hard-code the number of threads to 2 in that specific example. On 11/6/22 02:30, Ivan Krylov wrote: On Sat, 5 Nov 2022 22:41:45 +0800 Jiaming Yuan wrote: Examples with CPU time > 2.5 times elapsed time I'm wondering what the note is trying to

[R-pkg-devel] FW: Writing to users config directory for CRAN package

2022-11-05 Thread Jonathan Godfrey
Further to Dirk's advice, my BrailleR package creates a folder (dumping ground). Users are asked if they want to use one of my choosing, or a temporary one. If they choose temporary, they get asked again and again until they cave in to my wishes! BrailleR also writes files to the current wo

Re: [R-pkg-devel] FW: Writing to users config directory for CRAN package

2022-11-05 Thread David Hugh-Jones
Thank you both. I guess the package can dog food itself by asking one time whether it can store its files. D On Sun, 6 Nov 2022 at 06:33, Jonathan Godfrey wrote: > > Further to Dirk's advice, my BrailleR package creates a folder (dumping > ground). Users are asked if they want to use one of m