Re: [Rd] Bug: time complexity of substring is quadratic as string size and number of substrings increases

2019-02-22 Thread Tomas Kalibera
On 2/20/19 7:55 PM, Toby Hocking wrote: Update: I have observed that stringi::stri_sub is linear time complexity, and it computes the same thing as base::substring. figure https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.png source: https://github.com/tdhock/namedCa

Re: [Rd] model.matrix.default() silently ignores bad contrasts.arg

2019-02-22 Thread Fox, John
Dear Martin and Ben, I agree that a warning is a good idea (and perhaps that wasn't clear in my response to Ben's post). Also, it would be nice to correct the omission in the help file, which as far as I could see doesn't mention that a contrast-generating function (as opposed to its quoted n

Re: [Rd] model.matrix.default() silently ignores bad contrasts.arg

2019-02-22 Thread Martin Maechler
> Ben Bolker > on Thu, 21 Feb 2019 08:18:51 -0500 writes: > On Thu, Feb 21, 2019 at 7:49 AM Fox, John wrote: >> >> Dear Ben, >> >> Perhaps I'm missing the point, but contrasts.arg is documented to be a list. From ?model.matrix: "contrasts.arg: A list, whose ent

Re: [Rd] Return/print standard error in t.test()

2019-02-22 Thread peter dalgaard
It's not a problem per se to put additional information into class htest objects (hey, it's S3 after all...) and there is a precedent in chisq.test which returns $observed and $expected. Getting such information printed by print.htest is more tricky, although it might be possible to (ab)use the

Re: [Rd] Proposed patch for ?Extract

2019-02-22 Thread Martin Maechler
> Marc Schwartz via R-devel > on Thu, 21 Feb 2019 14:39:45 +0100 writes: > Hi, > In follow up to the thread on R-Help yesterday: >https://stat.ethz.ch/pipermail/r-help/2019-February/461725.html > I am attaching a proposed patch against the trunk version of > Extract.Rd, with

Re: [Rd] Return/print standard error in t.test()

2019-02-22 Thread Martin Maechler
> Thomas J Leeper > on Thu, 21 Feb 2019 22:21:21 + writes: > Hi John, > Thanks for your reply. Of course I could write a package and of course I > would find that trivial to do. The point is this is a main entry point to R > for probably (at this point) hundreds o