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 & R-devel Mailing Lists: Rem

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 c

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 \para

[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 wi

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

2018-03-16 Thread Mark van der Loo
fit the 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, >

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

2018-03-16 Thread Mark van der Loo
t; but "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 for the

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] 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: do

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 wor

Re: [Rd] compairing doubles

2018-08-31 Thread Mark van der Loo
16:00 schreef Mark 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 th

Re: [Rd] compairing doubles

2018-08-31 Thread Mark van der Loo
1 ago. 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(., &g

Re: [Rd] NEWS.md support on CRAN

2015-06-04 Thread Mark van der Loo
FWIW (and a bit late in the discussion, I know), I for one do not care about having NEWS in md format at all. The solution the Yihui uses (linking to GH from NEWS.Rd) is really annoying for people with no direct Internet access. For example, I work at an institute that handles a lot of private dat

Re: [Rd] NEWS.md support on CRAN

2015-06-04 Thread Mark van der Loo
@Gavin: My aim was to point out that the ability to mix developer-facing documentation with user-facing documentation is not a good reason to want to support md. I agree with Duncan that links to within a package would be useful (not sure if NEWS.Rd supports this). I'm not so convinced that packa

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 p

[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 produc

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

2015-12-01 Thread Mark van der Loo
ing is not needed, but myfun may legitimately 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.

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, Konrad Rudolph wrote:

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] (no) circular dependency

2016-04-08 Thread Mark van der Loo
on. > > This is just an example, there could be others as well, reason for which I > am (still) looking for a solution to: > - preserve the current functionalities in packages A and B (to follow > Dmitri's original post) > - be able to use functions from each other &

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 calle

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) paste0(x

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 > Jori

[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 extraction,

Re: [Rd] Natural vs National in R signon banner?

2017-09-01 Thread Mark van der Loo
The way it's phrased now makes it seem that English is not a Natural language ("Natural language support *but* running in an English locale"). Why not just state: "running in an English locale" and leave it with that? Better to leave something out than to be unclear (being correct formally does not

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 J

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 fami

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 > > > > > https://www.markvanderloo.eu/yaRb/2019/01/11/add-a-static-pdf-vignette-to-

[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, .li

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

2020-12-23 Thread Mark van der Loo
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

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 en

[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 'encodeStri

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 PM,

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] http://cran.r-project.org/doc/manuals/r-relea

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 > wrote: >> Richie, >> >> The R language definition [1] says (10.3.1): >> >> \U \U{} >> (wher

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 [*] http://cran.r-project.org/doc/manuals/r-release/R-ad

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 wrote: > >>