Re: [Rd] 1954 from NA

2021-05-23 Thread Mark van der Loo
I wrote about this once over here: http://www.markvanderloo.eu/yaRb/2012/07/08/representation-of-numerical-nas-in-r-and-the-1954-enigma/ -M Op zo 23 mei 2021 15:33 schreef brodie gaslam via R-devel < r-devel@r-project.org>: > I should add, I don't know that you can rely on this > particular

Re: [R-pkg-devel] Skipping tests on CRAN

2021-04-21 Thread Mark van der Loo
Hi Ott, There is no documented way to detect whether you are running on CRAN. So there is nothing to rely on, on that side. You can only make your own machine detectable by the test code. For example by setting an environment variable that identifies your machine and make test execution depend

Re: [Rd] [External] setting .libPaths() with parallel::clusterCall

2020-12-23 Thread Mark van der Loo
} with static scheduling uses the default (one chunk per node). With dynamic scheduling, chunk size of \code{0} has the same effect as \code{1} (one invocation of \code{FUN}/\code{fun} per On Tue, Dec 22, 2020 at 2:37 PM wrote: > On Tue, 22 Dec 2020, Mark van der Loo wrote: > &g

[Rd] setting .libPaths() with parallel::clusterCall

2020-12-22 Thread Mark van der Loo
Dear all, It is not possible to set library paths on worker nodes with parallel::clusterCall (or snow::clusterCall) and I wonder if this is intended behavior. Example. library(parallel) libdir <- "./tmplib" if (!dir.exists(libdir)) dir.create("./tmplib") cl <- makeCluster(2) clusterCall(cl,

Re: [Rd] vignettes present in 2 folders or won't work

2020-11-02 Thread Mark van der Loo
On Sun, Nov 1, 2020 at 10:39 PM Duncan Murdoch wrote: > On 01/11/2020 2:57 p.m., Dirk Eddelbuettel wrote: > > > > The closest to a canonical reference for a static vignette is the basic > blog > > post by Mark at > > > > >

Re: [R-pkg-devel] Interpret feedback: not write testthat-tests in examples

2020-07-16 Thread Mark van der Loo
Dear Richel, The comment itself is pretty clear I think: to be accepted on CRAN you should not use testthat tests in your examples. I can't speak for CRAN but I'm pretty convinced this is for testing in general. Tests are for testing, not for demonstration. Most users of your package will

Re: [R-pkg-devel] License of pre-built vignettes

2019-10-25 Thread Mark van der Loo
Adding a static PDF vignette is very easy. I have written about it here: http://www.markvanderloo.eu/yaRb/2019/01/11/add-a-static-pdf-vignette-to-an-r-package/ Best, Mark Op vr 25 okt. 2019 13:22 schreef Berry Boessenkool < berryboessenk...@hotmail.com>: > > You could also consider a static

Re: [R-pkg-devel] General considerations about vignettes

2019-08-30 Thread Mark van der Loo
At the cost of some level of reproducibility, you could use a static vignette and be very clear about the package versions used in the comparisons: http://www.markvanderloo.eu/yaRb/2019/01/11/add-a-static-pdf-vignette-to-an-r-package/ As this does diminish the coherence of CRAN somewhat I'm not

Re: [R-pkg-devel] CRAN student assistants

2019-05-15 Thread Mark van der Loo
For what it's worth, I recently submitted a new package that was initially refused (with comments) by CRAN. I updated number of them accordingly, but there were a few that with good reasons I could not change. I explained this in the comments when uploading a new version and it got accepted. So I

Re: [R-pkg-devel] Submitting CORELS (Certifiably Optimal Rule Lists) package with/without Windows support

2018-12-20 Thread Mark van der Loo
Dear Aditya, You ask: | Am I able to submit this without Windows support, or could somebody help us with supporting Windows? The CRAN policy[1] is pretty clear about this: "Package authors should make all reasonable efforts to provide cross-platform portable code. Packages will not normally

Re: [Rd] compairing doubles

2018-08-31 Thread Mark van der Loo
. 2018 a las 16:00, Mark van der Loo > () escribió: > > > > how about > > > > is_evenly_spaced <- function(x,...) all.equal(diff(sort(x)),...) > > This doesn't work, because > > 1. all.equal does *not* return FALSE. Use of isTRUE or identical(., > TRUE) i

Re: [Rd] compairing doubles

2018-08-31 Thread Mark van der Loo
van der Loo < mark.vander...@gmail.com>: > how about > > is_evenly_spaced <- function(x,...) all.equal(diff(sort(x)),...) > > (use ellipsis to set tolerance if necessary) > > > Op vr 31 aug. 2018 om 15:46 schreef Emil Bode : > >> Agreed that's it's roun

Re: [Rd] compairing doubles

2018-08-31 Thread Mark van der Loo
how about is_evenly_spaced <- function(x,...) all.equal(diff(sort(x)),...) (use ellipsis to set tolerance if necessary) Op vr 31 aug. 2018 om 15:46 schreef Emil Bode : > Agreed that's it's rounding error, and all.equal would be the way to go. > I wouldn't call it a bug, it's simply part of

Re: [R-pkg-devel] Package builds, installs, and runs but does not pass devtools::check()

2018-07-19 Thread Mark van der Loo
), even during the development stages. Can > you comment? Thanks. > > -- Mike > > > On Tue, Jul 17, 2018 at 2:53 AM, Mark van der Loo > wrote: > > Michael, > > > > Just a small side-track here. I would avoid using the not-a-pipe operator > > with

Re: [R-pkg-devel] Package builds, installs, and runs but does not pass devtools::check()

2018-07-17 Thread Mark van der Loo
Michael, Just a small side-track here. I would avoid using the not-a-pipe operator within functions or packages in general. It is great for interactive use, but it does make debugging and hence long-term maintenance of functions harder. There are two reasons for this. First, it hides intermediate

Re: [R-pkg-devel] Questions about making a database package (Rpolyhedra)

2018-06-29 Thread Mark van der Loo
Hi Alejandro, Brooke Anderson gave a nice talk at useR!2017 addressing this exact issue. See https://schd.ws/hosted_files/user2017/19/anderson-eddelbuettel-use_r_talk.pdf for the slides. The basic idea is to use an external CRAN-like repository for the data back-end. Brooke used 'drat' to set up

Re: [R-pkg-devel] How to handle deprecated package dependency? 2 suggestions 1 question

2018-06-26 Thread Mark van der Loo
Dear Vincent, I think this is little known, but you can get the CRAN result status of any package from R, see tools::CRAN_check_results(). Best, Mark Op ma 25 jun. 2018 om 22:13 schreef Duncan Murdoch : > On 25/06/2018 3:21 PM, Vincent van Hees wrote: > > Dear all, > > > > One of my package

Re: [Rd] length of `...`

2018-05-03 Thread Mark van der Loo
This question is better aimed at the r-help mailinglist as it is not about developing R itself. having said that, I can only gues why you want to do this, but why not do something like this: f <- function(...){ L <- list(...) len <- length() # you can stll pass the ... as follows:

Re: [Rd] data.table not available as win binary for R 3.5

2018-04-24 Thread Mark van der Loo
FWIW, I see that stringdist also doesn't pass R CMD check on r-release and r-devel on Windows while Linux or r-oldrel on Windows gives no problems[1]. A quick scan of the release notes on Windows specific changes doesn't give me a clue yet. I see the following possibly significant warning in the

Re: [Rd] Apparent bug in behavior of formulas with '-' operator for lm

2018-03-16 Thread Mark van der Loo
t "this is not a bug per se". Meaning that this is not optimal behaviour > and might not what you expect, but it follows the documentation of the > underlying functions. > > Solving it would require a bypass of model.frame() to construct the > correct model,matrix fo

Re: [Rd] Apparent bug in behavior of formulas with '-' operator for lm

2018-03-16 Thread Mark van der Loo
e model. If you add > levels to these factors, it's impossible to use that model to predict for > these new data. > > Cheers > Joris > > On Fri, Mar 16, 2018 at 10:21 AM, Mark van der Loo < > mark.vander...@gmail.com> wrote: > >> Dear R-developers, >> &g

Re: [R-pkg-devel] library dlstats -> cran_stats()

2018-03-16 Thread Mark van der Loo
Knut AFAIR the download statistics are limited to downloads from RStudio's cloud service, so none of the other CRAN mirrors are included. I think there is no separation between updates, re-installs, or installs done automatically by CI-services, for example. -Mark Op vr 16 mrt. 2018 om 12:30

[Rd] Apparent bug in behavior of formulas with '-' operator for lm

2018-03-16 Thread Mark van der Loo
Dear R-developers, In the 'lm' documentation, the '-' operator is only specified to be used with -1 (to remove the intercept from the model). However, the documentation also refers to the 'formula' help file, which indicates that it is possible to subtract any term. Indeed, the following works

Re: [Rd] Best practices in developing package: From a single file

2018-01-31 Thread Mark van der Loo
I fully agree with Joris and Hadley on roxygen2. Additionally: I wrote and published my first package before roxygen (or roxygen2) was available. I found editing .Rd extremely terse (especially when code is updated). For example, the fact that there are no spaces allowed between } and { in

Re: [Rd] Searching R Packages

2018-01-29 Thread Mark van der Loo
Dear Spencer, Nice initiative! I discover a lot of packages not by explicit search, but by running into them. I find cranberries really helpful there, especially the twitter feed (@CRANberries) and also r-bloggers, especially through Joseph Rickert's monthly roundup of new packages. And then of

Re: [R-pkg-devel] CRAN policy on binary submission

2018-01-08 Thread Mark van der Loo
Dear Hugh, this question was asked earlier on this list: http://r.789695.n4.nabble.com/executable-files-R-package-td4390488.html See especially the answer of Duncan Murdoch. Best, Mark Op di 9 jan. 2018 om 03:26 schreef Hugh Parsonage : > On

Re: [Rd] Community Feedback: Git Repository for R-Devel

2018-01-04 Thread Mark van der Loo
This question has been discussed before on this list: http://r.789695.n4.nabble.com/Why-R-project-source-code-is-not-on-Github-td4695779.html See especially Jeroen's answer. Best, Mark Op do 4 jan. 2018 om 01:11 schreef Juan Telleria : > UNBIASED FACTS: > • Bugzilla &

Re: [Rd] Change to r-devel warns on #pragma

2017-12-11 Thread Mark van der Loo
Hi Patrick, It was recently added as a cran policy (thanks Dirk's cran policy watch: https://twitter.com/markvdloo/status/935810241190617088). It seems to be a general stricter policy on keeping to the C(++) standard. Warnings are there for a reason and should usually not be ignored. I'm not

Re: [R-pkg-devel] Questions about third-party package distribution, especially with respect to security

2017-09-17 Thread Mark van der Loo
Dear Robert, R supports package repositories out of the box. A repository is just a way of organizing files. The most popular repositories are CRAN and Bioconductor. There is even a package that allows you to set up your own repository on Github (the drat package). It depends on the repository

Re: [Rd] R Configuration Variable: Maximum Memory Allocation per R Instance

2017-09-17 Thread Mark van der Loo
Dear Juan, I'm not deeply familiar with the DB's you mention but it seems to me that me that 'memory.limits' does what you want on one OS and you can use shell commands to limit R's memory usage for *nix-alike systems (see ?memory.limits). Also, Jeroen Ooms wrote a nice article about this in the

Re: [R-pkg-devel] New Package Proposal: Feather with Matrix Notation ( [ , ] $ ) Access

2017-09-17 Thread Mark van der Loo
You could first have a look at the LaF packge. It does a lot of what you want already. -M Op zo 17 sep. 2017 om 04:41 schreef Juan Telleria : > Dear R Developers, > > I am writing as I would like to propose a github project for the creation > of on-disk data.frames/tibbles.

[Rd] bugs in documentation of stats::stl

2017-08-23 Thread Mark van der Loo
Dear list, R-core, The documentation of stats::stl explicitly refers to the paper by Cleveland[1] to explain the parameters. However, the description is confusing, with two descriptions seeming to refer to the same parameter in the paper. s.window: [...] the loess window for seasonal

Re: [R-pkg-devel] problem with package_native_routine_registration_skeleton

2017-06-22 Thread Mark van der Loo
I have had no problems recently (having updated a pkg or two with this over the last couple of weeks). Your question is not reproducible so its hard to help... best, Mark Op wo 21 jun. 2017 om 23:46 schreef Simon Barthelmé < simon.barthe...@gipsa-lab.fr>: > Dear list, > > Is anybody else having

Re: [R-pkg-devel] Spell checking

2017-06-20 Thread Mark van der Loo
I had the same experience. Also recently I uploaded a pkg without a vignette but with a vignette engine specified in the DESCRIPTION. This gave no error with R CMD check --as-cran (r-dev) but I did receive a request to fix it. -M On Tue, Jun 20, 2017, 17:50 Thomas J. Leeper

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Mark van der Loo
, and then you need paste() or paste0() > anyway > > I'm not against incorporating the patch, as it would eliminate a few > keystrokes. It's a neat idea, but I don't expect any other noticeable > advantage from it. > > my humble 2 cents > Cheers > Joris > > On Wed, Ju

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Mark van der Loo
Having some line-breaking character for string literals would have benefits as string literals can then be constructed parse-time rather than run-time. I have run into this myself a few times as well. One way to at least emulate something like that is the following. `%+%` <- function(x,y)

Re: [R-pkg-devel] How do you discover and learn about R packages?

2017-03-20 Thread Mark van der Loo
Julia, Just took the poll. I think cranberries would deserve mention there as well. It is the only continuous feed that reports in new pkgs and updates (that I know of). Best, Mark On Mon, Mar 20, 2017, 14:57 Julia Silge wrote: > I am contributing to a session at userR

Re: [R-pkg-devel] UseR! Session: Making R easier to use (was: Navigating the jungle of R packages)

2017-02-12 Thread Mark van der Loo
Fwiw, there's also something called the awesome lists ( https://github.com/sindresorhus/awesome, and see the R list here: https://github.com/qinwf/awesome-R), which is basically a kind of task views for any language, and controlled via git pull requests. Not sure if this would be a good

Re: [R-pkg-devel] Compiler choice on CRAN (R-windows-oldrel)

2016-08-25 Thread Mark van der Loo
mpiling with gcc <= 4.6.x Best, Mark Op do 25 aug. 2016 om 14:44 schreef Uwe Ligges < lig...@statistik.tu-dortmund.de>: > > > On 25.08.2016 13:14, Mark van der Loo wrote: > > Thank you Peter, good points. > > > > Good to know for sure (or a.s.) that c

[R-pkg-devel] Compiler choice on CRAN (R-windows-oldrel)

2016-08-25 Thread Mark van der Loo
Dear listers, Compilation of my gower pkg fails on R-oldrel-windows. I am pretty sure that this is because it uses gcc 4.6.3 which has limited support for OpenMP (the errors are the same as I got on the old travis-ci build environment, see my related question[1]). Now, according to the Rtools

Re: [R-pkg-devel] openMP/reduction statement causes build crash on travis-ci

2016-08-03 Thread Mark van der Loo
org>: > > On 3 August 2016 at 08:13, Mark van der Loo wrote: > | Dear pkg developers, > | > | > | I'm working on a package using C code and openMP. The package builds and > | tests fine on my own machine[1] and also on r-hub[2]. However on > travis-ci > | the build cras

Re: [R-pkg-devel] Handling Not-Always-Needed Dependencies?

2016-08-03 Thread Mark van der Loo
After reading the link in Dirk's initial reply, how about adding fields 'Recommends' and 'Build-Depends' to DESCRIPTION as in Debian? Recommends: only gets installed, can be used via if(requireNamespace()) from the package and in pkg tests[1]. [Debian: The Recommends field should list packages

[R-pkg-devel] openMP/reduction statement causes build crash on travis-ci

2016-08-03 Thread Mark van der Loo
Dear pkg developers, I'm working on a package using C code and openMP. The package builds and tests fine on my own machine[1] and also on r-hub[2]. However on travis-ci the build crashes[3] with the following message (plus a few similar): gower.c:297:29: error: expected ‘+’, ‘*’, ‘-’, ‘&’, ‘^’,

Re: [R-pkg-devel] Package was removed from CRAN "despite reminders" -- but I did not receive any such messages

2016-06-01 Thread Mark van der Loo
Mail the CRAN team. On Wed, Jun 1, 2016, 10:24 Dean Attali wrote: > My package 'ddpcr' was accepted into CRAN in 2016-02-19 and then updated on > 2016-03-17. There were no errors or warnings or notes in my submission and > it was accepted right away. > > I just tried going

Re: [Rd] Single-threaded aspect

2016-05-12 Thread Mark van der Loo
Charles, 1. Perhaps this question is better directed at the R-help or R-pacakge-devel mailinglist. 2. It basically means that R itself can only evaluate one R expression at the time. The parallel package circumvents this by starting multiple R-sessions and dividing workload. Compiled code

Re: [Rd] (no) circular dependency

2016-04-08 Thread Mark van der Loo
void circular dependency > > I hope this explains it, > Adrian > > > On Thu, Apr 7, 2016 at 11:36 PM, Mark van der Loo < > mark.vander...@gmail.com> wrote: > >> At the risk of stating the over-obvious: there's also the option of >> creating just a single pack

Re: [Rd] (no) circular dependency

2016-04-07 Thread Mark van der Loo
At the risk of stating the over-obvious: there's also the option of creating just a single package containing all functions. None of the functions that create the interdependencies need to be exported that way. Btw, his question is probably better at home at the r-package-devel list. Best, M

Re: [Rd] How do I reliably and efficiently hash a function?

2015-12-11 Thread Mark van der Loo
In addition to what Charles wrote, you can also use 'local' if you don't want a function that creates another function. > f <- local({info <- 10; function(x) x + info}) > f(3) [1] 13 best, Mark Op vr 11 dec. 2015 om 03:27 schreef Charles C. Berry : > On Thu, 10 Dec 2015,

Re: [Rd] Inconsistency in treating NaN-results?

2015-12-01 Thread Mark van der Loo
return > > Inf, so sin feels it helpful to warn in that case. And warnings can > > always be turned off and/or ignored. > > > > The only real exception that you show is 0/0 is does not start with > > NaN, but produces NaN. But infix operator functions tend t

[Rd] Inconsistency in treating NaN-results?

2015-11-26 Thread Mark van der Loo
This question is more out of curiosity than a complaint or suggestion, but I'm just wondering. The behavior of R on calculations that result in NaN seems a bit inconsistent. # this is expected: > 0/0 [1] NaN # but this gives a warning > sin(Inf) [1] NaN Warning message: In sin(Inf) : NaNs

Re: [Rd] is R syntax closed?

2015-09-19 Thread Mark van der Loo
> comment, some marker for 'command doesn't end at this line' etc. That is not necessary since R supports multi-line commands without the need for marking continuation. > R syntax done and any extensions are forbidden? R is maintained and extended by the R code team[1] who decide on the GNU R

Re: [R-pkg-devel] [[openmx-dev]] [[openmx-dev]] Re: [[openmx-dev]] Re: openmp

2015-08-25 Thread Mark van der Loo
. Supplying binaries seems the only option unless clang developers decide to support OpenMP, which seems unlikely since Apple wants to promote its own parallel computing tools. Michael Neale mcne...@mac.com On Aug 24, 2015, at 3:38 PM, Mark van der Loo mark.vander...@gmail.com wrote: At least

Re: [R-pkg-devel] browseURL in examples

2015-08-18 Thread Mark van der Loo
Berry, why not use \href{[your link]}{[link text]} in the documentation details[1]? Best, Mark [1] https://cran.r-project.org/doc/manuals/R-exts.html#Marking-text Op di 18 aug. 2015 om 13:21 schreef Duncan Murdoch murdoch.dun...@gmail.com : On 18/08/2015 6:12 AM, Berry Boessenkool wrote:

Re: [Rd] Development version of R: Improved nchar(), nzchar() but changed API

2015-04-27 Thread Mark van der Loo
Dear Martin, Does the work on nchar mean that bugs #16090 and #16091 will be resolved [1,2]? Thanks, Mark [1] https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16090 [2] https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16091 On Sat, Apr 25, 2015 at 11:06 PM, James Cloos

Re: [Rd] Possible values for R version status

2015-03-23 Thread Mark van der Loo
In the R installation and administration manual[*] I see at least mentioned The alpha, beta and RC versions of an upcoming x.y.0 release are available [...] so 'beta' seems to be an option unless it is only used informally there. Mark [*]

Re: [Rd] \U with more than 4 digits returns the wrong character

2014-12-04 Thread Mark van der Loo
Richie, The R language definition [1] says (10.3.1): \U \U{} (where multibyte locales are supported and not on Windows, otherwise an error). Unicode character with given hex code – sequences of up to eight hex digits. Best, Mark [1]

Re: [Rd] \U with more than 4 digits returns the wrong character

2014-12-04 Thread Mark van der Loo
a warning under Windows might be nicer behaviour than silently returning the wrong value too. On 4 December 2014 at 22:24, Mark van der Loo mark.vander...@gmail.com wrote: Richie, The R language definition [1] says (10.3.1): \U \U{} (where multibyte locales are supported

Re: [Rd] R string comparisons may vary with platform (plain text)

2014-11-24 Thread Mark van der Loo
The 'stringi' package claims robust cross-platform performance. It exports much functionality of the ICU library and will attempt to install it when not present. The function 'stri_sort' accepts a collation argument that can be defined with 'stri_opts_collator'. On Sun, Nov 23, 2014 at 5:15

[Rd] nchar reporting wrong width when zero-space character is present?

2014-11-19 Thread Mark van der Loo
Dear list, If I include the zero-width non-breaking space (\ufeff) in a string, nchar seems to compute the wrong number of columns used by 'cat'. x - f\ufeffoo x [1] foo nchar(x,type=width) [1] 2 I would expect 3 here. Going through the documentation of 'Encoding' and 'encodeString', I