Re: [Rd] Odd behaviour in within.list() when deleting 2+ variables

2017-06-26 Thread Martin Maechler
>>>>> "PD" == Peter Dalgaard >>>>> on Mon, 26 Jun 2017 20:12:38 +0200 writes: >> On 26 Jun 2017, at 19:04 , Martin Maechler >> wrote: >> >>>>>>> peter dalgaard on Mon, 26 Jun >>>

Re: [Rd] Odd behaviour in within.list() when deleting 2+ variables

2017-06-26 Thread Martin Maechler
>>>>> peter dalgaard >>>>> on Mon, 26 Jun 2017 13:43:28 +0200 writes: > This seems to be due to changes made by Martin Maechler in > 2008. Presumably this fixed something, but it escapes my > memory. Yes: The change set (svn -c46441) also

Re: [Rd] duplicated factor labels.

2017-06-23 Thread Martin Maechler
: Male Male Male Female > which gave a result somewhat similar to the new R-devel result. I would argue the new result should be fine Yes, if unwise people used suppressWarnings(.) around their code, they may be surprised now but that's what you get if you suppress warnings w

Re: [Rd] duplicated factor labels.

2017-06-23 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Thu, 22 Jun 2017 11:43:59 +0200 writes: >>>>> Paul Johnson >>>>> on Fri, 16 Jun 2017 11:02:34 -0500 writes: >> On Fri, Jun 16, 2017 at 2:35 AM, Joris Meys wrote: >>> To

Re: [Rd] duplicated factor labels.

2017-06-22 Thread Martin Maechler
> Paul Johnson > on Fri, 16 Jun 2017 11:02:34 -0500 writes: > On Fri, Jun 16, 2017 at 2:35 AM, Joris Meys wrote: >> To extwnd on Martin 's explanation : >> >> In factor(), levels are the unique input values and labels the unique output >> values. So the function

Re: [Rd] "factor now uses order() to sort its levels" not yet in R 3.4.0

2017-06-15 Thread Martin Maechler
> Suharto Anggono Suharto Anggono > on Wed, 14 Jun 2017 17:17:38 + writes: [quite important stuff, taking _longer_ to reply ...] >     > By the way, in NEWS, in "CHANGES IN R 3.4.0", in "SIGNIFICANT USER-VISIBLE CHANGES", there is "factor() now uses order()

Re: [Rd] duplicated factor labels.

2017-06-15 Thread Martin Maechler
> Paul Johnson > on Wed, 14 Jun 2017 19:00:11 -0500 writes: > Dear R devel > I've been wondering about this for a while. I am sorry to ask for your > time, but can one of you help me understand this? > This concerns duplicated labels, not levels, in the factor functio

Re: [Rd] [bug] droplevels() also drop object attributes (comment…)

2017-06-09 Thread Martin Maechler
IFICANT USER-VISIBLE CHANGES", there is "factor() now uses order() to sort its levels". It is false. Code of function 'factor' in R 3.4.0 (https://svn.r-project.org/R/tags/R-3-4-0/src/library/base/R/factor.R) still uses 'sort.list', not 'order'. >

Re: [Rd] Usage of PROTECT_WITH_INDEX in R-exts

2017-06-09 Thread Martin Maechler
>>>>> Kirill Müller >>>>> on Thu, 8 Jun 2017 12:55:26 +0200 writes: > On 06.06.2017 22:14, Kirill Müller wrote: >> >> >> On 06.06.2017 10:07, Martin Maechler wrote: >>>>>>>> Kirill Müller on

Re: [Rd] Creating a private CRAN with webpages

2017-06-08 Thread Martin Maechler
/cloud.r-project.org/mirror-howto.html There it tells you to use rsync, and I strongly recommend you do! Martin Maechler, ETH Zurich (running one of the oldest - public - CRAN Mirrors) >> On 8 Jun 2017, at 23:29, Joshua Bradley >> wrote: >> >>

Re: [Rd] sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31

2017-06-07 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Tue, 6 Jun 2017 09:45:44 +0200 writes: >>>>> Hervé Pagès >>>>> on Fri, 2 Jun 2017 04:05:15 -0700 writes: >> Hi, I have a long numeric vector 'xx' and I want to use >>

Re: [Rd] [bug] droplevels() also drop object attributes (comment…)

2017-06-06 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Tue, 16 May 2017 11:01:23 +0200 writes: >>>>> Serge Bibauw >>>>> on Mon, 15 May 2017 11:59:32 -0400 writes: >> Hi, >> Just reporting a small bug… not really a big deal

Re: [Rd] Usage of PROTECT_WITH_INDEX in R-exts

2017-06-06 Thread Martin Maechler
> Kirill Müller > on Mon, 5 Jun 2017 17:30:20 +0200 writes: > Hi I've noted a minor inconsistency in the documentation: > Current R-exts reads > s = PROTECT_WITH_INDEX(eval(OS->R_fcall, OS->R_env), &ipx); > but I believe it has to be > PROTECT_WITH_INDEX(s = eva

Re: [Rd] sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31

2017-06-06 Thread Martin Maechler
> Hervé Pagès > on Fri, 2 Jun 2017 04:05:15 -0700 writes: > Hi, I have a long numeric vector 'xx' and I want to use > sum() to count the number of elements that satisfy some > criteria like non-zero values or values lower than a > certain threshold etc... > The pr

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Martin Maechler
> Serguei Sokol > on Wed, 31 May 2017 18:46:34 +0200 writes: > Le 31/05/2017 à 17:30, Serguei Sokol a écrit : >> >> More thorough reading revealed that I have overlooked this phrase in the >> line's doc: "left and right /thirds/ of the data" (emphasis is mine). >

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-30 Thread Martin Maechler
>>>>> Serguei Sokol >>>>> on Tue, 30 May 2017 16:01:17 +0200 writes: > Le 30/05/2017 à 09:33, Martin Maechler a écrit : ... >> However, even after the patch, The example from the SO >> post differs from the result of Richie Cotton&

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-30 Thread Martin Maechler
From Stackoverflow ## http://stackoverflow.com/questions/3224731/john-tukey-median-median-or-resistant-line-statistical-test-for-r-and-line ## median_median_line by Richie Cotton (July 12 2010, last edited at 13:49) ## ## Shorter variable names, fixed bug in step 1, added 'plot.' option: M

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-20 Thread Martin Maechler
This may affect package checks check for the _wording_ of stopifnot error messages [which may not be the best idea .. though understandable for regression checks]. Martin > Bill Dunlap > TIBCO Software > wdunlap tibco.com > On Fri, May 19, 2017 at 5:31 AM, Martin

Re: [Rd] test fails when requesting LC_CTYPE

2017-05-20 Thread Martin Maechler
> Kasper Daniel Hansen > on Fri, 19 May 2017 20:09:24 -0400 writes: > I rebuilt R with > export LC_CTYPE=en_US.UTF-8 > and the test still fail. Surprisingly, when I run R from the bin directory > and execute the test code, it runs without error: >> oloc <- Sys.get

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-19 Thread Martin Maechler
Error: ..2 is not TRUE {and to "fix" this, e.g., with an extra optional argument} would lead to more complications which I really think we do not want}. But the example does show we should keep match.call(). Martin > > On

Re: [Rd] [R] R-3.4.0 fails test

2017-05-18 Thread Martin Maechler
Paris time zone. The issue seems to be that, for the date > > chosen for the test, Summer/daylight savings time is in force in NZ and > > some other parts of the southern hemisphere , but not in the northern > > hemisphere. > > > Of course! I overlooked that the date i

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-18 Thread Martin Maechler
this is really too simple) >> Stopifnot <- function(...) >> { >> n <- length(match.call()) - 1 >> for (i in 1:n) >> { >> nm <- as.name(paste0("..",i)) >> if (!eval(nm)) stop("not all true") >> }

Re: [Rd] problem running test on a system without /etc/localtime

2017-05-17 Thread Martin Maechler
> Henrik Bengtsson > on Tue, 16 May 2017 20:49:02 -0700 writes: > On Tue, May 16, 2017 at 5:35 PM, Kirill Maslinsky wrote: >> Hi all, >> >> A problem with tests while building R. >> >> I'm packaging R for Sisyphus repository and package build environment,

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-16 Thread Martin Maechler
>>>>> >>>>> on Tue, 16 May 2017 09:49:56 -0500 writes: > On Tue, 16 May 2017, Martin Maechler wrote: >>>>>>> Hervé Pagès >>>>>>> on Mon, 15 May 2017 16:54:46 -0700 writes: >> >>

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-16 Thread Martin Maechler
entioned above, the creation of good error messages has been an important design goal of stopifnot() and hence I'm willing to accept the extra complexity of "patching up" the call used in the error / warning messages. Also, as a change to what I posted yesterday, I now plan

Re: [Rd] [bug] droplevels() also drop object attributes (comment…)

2017-05-16 Thread Martin Maechler
> Serge Bibauw > on Mon, 15 May 2017 11:59:32 -0400 writes: > Hi, > Just reporting a small bug… not really a big deal, but I don’t think that is intended: droplevels() also drops all object’s attributes. Yes. The help page for droplevels (or the simple definition of 'dropl

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Martin Maechler
>>>>> Serguei Sokol >>>>> on Mon, 15 May 2017 16:32:20 +0200 writes: > Le 15/05/2017 à 15:37, Martin Maechler a écrit : >>>>>>> Serguei Sokol >>>>>>> on Mon, 15 May 2017 13:14:34 +0200 writes: >&

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Martin Maechler
(nm)) stop("not all true") > } > } > Stopifnot(2+2==4) > Stopifnot(2+2==5, print("Hey!!!") == "Hey!!!") > Stopifnot(2+2==4, print("Hey!!!") == "Hey!!!") > Stopifnot(T,T,T,T,T,T,T,T,T,T,T,T,T,

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Martin Maechler
ightly modified version called stopifnot_new() >> which works in accordance with the man page and >> where there are only two additional calls: parent.frame() and eval(). >> I don't think it can be considered as real performance penalty >> as the same or

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Martin Maechler
> Hervé Pagès > on Wed, 3 May 2017 12:08:26 -0700 writes: > On 05/03/2017 12:04 PM, Hervé Pagès wrote: >> Not sure why the performance penalty of nonstandard evaluation would >> be more of a concern here than for something like switch(). > which is actually a primitiv

Re: [Rd] tempdir() may be deleted during long-running R session

2017-04-26 Thread Martin Maechler
> Dirk Eddelbuettel > on Wed, 26 Apr 2017 08:40:38 -0500 writes: > On 26 April 2017 at 08:29, Duncan Murdoch wrote: > | This seems like the wrong approach. The problem occurs as soon as the > | tempdir() gets cleaned up: there could be information in temp files > |

Re: [Rd] tempdir() may be deleted during long-running R session

2017-04-26 Thread Martin Maechler
> > on Tue, 25 Apr 2017 21:13:59 -0700 writes: > On Tue, Apr 25, 2017 at 02:41:58PM +, Cook, Malcolm wrote: >> Might this combination serve the purpose: >> * R session keeps an open handle on the tempdir it creates, >> * whatever tempdir harvesting cron job the

Re: [Rd] tempdir() may be deleted during long-running R session

2017-04-25 Thread Martin Maechler
>>>>> Jeroen Ooms >>>>> on Tue, 25 Apr 2017 15:05:51 +0200 writes: > On Tue, Apr 25, 2017 at 1:00 PM, Martin Maechler > wrote: >> As I've found it is not at all hard to add an option >> which checks the existence and i

Re: [Rd] tempdir() may be deleted during long-running R session

2017-04-25 Thread Martin Maechler
> Dirk Eddelbuettel > on Sun, 23 Apr 2017 09:15:18 -0500 writes: > On 21 April 2017 at 10:34, frede...@ofb.net wrote: > | Hi Mikko, > | > | I was bitten by this recently and I think some of the replies are > | missing the point. As I understand it, the problem con

Re: [Rd] c() documentation after change; 'recursive' in "base" methods

2017-04-20 Thread Martin Maechler
> Suharto Anggono Suharto Anggono via R-devel > on Wed, 19 Apr 2017 22:50:41 + writes: > In R 3.4.0 RC, argument list of 'c' as S4 generic function has become > (x, ...) . > However, "S4 methods" section in documentation of 'c' (c.Rd) is not updated yet. Thank you, I

Re: [Rd] "table(droplevels(aq)$Month)" in manual page of droplevels

2017-04-13 Thread Martin Maechler
t; Hadley Wickham's "Advanced R". > But note that droplevels(aq)["Month"] and > droplevels(aq)$Month are _not_ the same. The first returns > a data.frame (with just one vector), the latter returns a > vector. To return just a vector you could al

Re: [Rd] Bug report: POSIX regular expression doesn't match for somewhat higher values of upper bound

2017-04-05 Thread Martin Maechler
> > on Tue, 4 Apr 2017 08:45:30 + writes: > Dear Sirs, > while >> regexpr('(.{1,2})\\1', 'foo') > [1] 2 > attr(,"match.length") > [1] 2 > attr(,"useBytes") > [1] TRUE > yields the correct match, an incremented upper bound in >> regexpr(

Re: [Rd] Very hard to reproduce bug (?) in R-devel

2017-04-05 Thread Martin Maechler
> Winston Chang > on Tue, 4 Apr 2017 15:29:40 -0500 writes: > I've done some more investigation into the problem, and it is very > difficult to pin down. What it looks like is happening is roughly like this: > - `p` is an environment and `p$e` is also an environment.

Re: [Rd] Potential bug in utils::citation()

2017-04-04 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Mon, 3 Apr 2017 10:22:52 +0200 writes: >>>>> Zhian Kamvar >>>>> on Sun, 2 Apr 2017 16:26:37 -0500 writes: >> Hi, I believe the function utils::citation() will fail if >> the

Re: [Rd] complex NA's match(), etc: not back-compatible change proposal

2017-04-03 Thread Martin Maechler
> Suharto Anggono Suharto Anggono via R-devel > on Sat, 1 Apr 2017 14:10:06 + writes: > I am raising this again. > With > z <- complex(real = c(0,NaN,NaN), imaginary = c(NA,NA,0)) , > results of > sapply(z, match, table = z) > and > mat

Re: [Rd] Potential bug in utils::citation()

2017-04-03 Thread Martin Maechler
. and that is due to a change by me, and I had started investigation on Friday (but not with your package and not having seen a straighforward example yet). This will be fixed ASAP, i.e., within hours. Martin Maechler > Background: > My package poppr suddenly started failing check on

Re: [Rd] `[` not recognized as a primitive in certain cases.

2017-03-29 Thread Martin Maechler
> Joris Meys > on Tue, 28 Mar 2017 15:19:14 +0200 writes: > Thank you gents, I overlooked the subtle differences. > On Tue, Mar 28, 2017 at 2:49 PM, Lukas Stadler > wrote: >> “typeof” is your friend here: >> >> > typeof(`[`) >> [1] "special" >> > ty

Re: [Rd] Documentation of model.frame() and get_all_vars()

2017-03-27 Thread Martin Maechler
nd for '(new)') > But, maybe that's something for the "Details" section? (Or it's a bug > - I don't really know.) I would not want to change model.frame.default() currently as it's too important a building block and it may be wise to require that its callers should have done recycling. > Thanks in advance for your consideration. Thank you Thomas for the suggested help file improvements! Martin -- Martin Maechler ETH Zurich > Best, > -Thomas > Thomas J. Leeper > http://www.thomasleeper.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Error in documentation for ?legend

2017-03-27 Thread Martin Maechler
not understand Peter: He *did* agree with you that there's no 'title.cex' argument and explained why the oddity probably has happened in the distant past ..) Martin Maechler ETH Zurich and R Core Team (as Peter Dalgaard) > From: peter dalgaard > Sent: Saturday, M

Re: [Rd] A question on stats::as.hclust.dendrogram

2017-03-24 Thread Martin Maechler
the following question has become irrelevant now, but yes, dendrograms *are* implemented as nested lists. Martin Maechler ETH Zurich and R core team > The line in question is at line 128 of dendrogram.R in R-3.3.3, at stats::as.hclust.dendrogram: > stopifnot(length(s) == 2L, all( vapply

Re: [Rd] IO error when writing to disk

2017-03-22 Thread Martin Maechler
way to create a small, say 1 MB, temporary file system as a non-root user? In that case, we could do all the testing from inside R .. Best, Martin Maechler > Thanks, > Jean-Sébastien Bevilacqua > 2017-03-20 10:24 GMT+01:00 realitix : >> Hello, >> Here a s

Re: [Rd] Hyperbolic tangent different results on Windows and Mac

2017-03-21 Thread Martin Maechler
-- and we should use it (by "#undef HAVE_CTAN" (or better by a configure check, using ctanh("500 + 0i"), as I see that on Windows, R> -1i * tan((500+0i)*1i) gives [1] 1+0i as it should for tanh(500+0i) --- but does not on Windows. Martin Maechler ETH Zurich and R Core __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] outer not applying a constant function

2017-03-21 Thread Martin Maechler
gt; TIBCO Software > wdunlap tibco.com You are right, thank you! Such a "convenience change" would not be a good idea. Martin Maechler ETH Zurich > On Mon, Mar 20, 2017 at 6:36 AM, Martin Maechler > wrote: >>>>>>> Gebhardt, Albrecht

Re: [Rd] outer not applying a constant function

2017-03-20 Thread Martin Maechler
> Gebhardt, Albrecht > on Sun, 19 Mar 2017 09:14:56 + writes: > Hi, > the function outer can not apply a constant function as in the last line of the following example: >> xg <- 1:4 >> yg <- 1:4 >> fxyg <- outer(xg, yg, function(x,y) x*y) >> fconstg <- ou

Re: [Rd] Support for user defined unary functions

2017-03-16 Thread Martin Maechler
> Jim Hester > on Thu, 16 Mar 2017 12:31:56 -0400 writes: > Gabe, > The unary functions have the same precedence as normal SPECIALS > (although the new unary forms take precedence over binary SPECIALS). > So they are lower precedence than unary + and -. Yes, both of yo

Re: [Rd] named arguments in formula and terms

2017-03-13 Thread Martin Maechler
Dear Achim, > Achim Zeileis > on Fri, 10 Mar 2017 15:02:38 +0100 writes: > Hi, we came across the following unexpected (for us) > behavior in terms.formula: When determining whether a term > is duplicated, only the order of the arguments in function > calls seems to b

Re: [Rd] Bug in nlm()

2017-03-08 Thread Martin Maechler
ttr(res, "hessian") <- h(x1, x2) return(res) } nlm.fgh <- nlm(fgh, c(-1.2,1)) I have almost finished a more detailed bug report, which I would like to submit. Best, Marie Boehnstedt >>>>> Martin Maechler >>>>> on Fri, 3 Mar 2017 18:15:47 +

Re: [Rd] Please add me to bugzilla

2017-03-06 Thread Martin Maechler
recursive > implementations. Very well done, thank you a lot! [and I will add you to bugzilla .. so you can use it for the next bug .. ;-)] Best, Martin > Regards, Bradley > On Mon, Mar 6, 2017 at 3:50 AM, Martin Maechler > wrote: >> >>>

Re: [Rd] Control statements with condition with greater than one should give error (not just warning) [PATCH]

2017-03-06 Thread Martin Maechler
until the flip is switched for all. or have I overlooked an issue? Martin > On Sat, Mar 4, 2017 at 12:04 PM, Martin Maechler > > wrote: >> >>>>> Henrik Bengtsson >>>>> >> on Fri, 3 Mar 2017 10:10:53 -0800 writes: >

Re: [Rd] Please add me to bugzilla

2017-03-06 Thread Martin Maechler
s' web page above). Posting to all 1000 R-devel readers with no content about what you consider a bug is a waste of bandwidth for at least 99% of these readers. [Yes, I'm also using their time ... in the hope to *improve* the quality of future such postings]. Martin Maechler ET

Re: [Rd] Control statements with condition with greater than one should give error (not just warning) [PATCH]

2017-03-04 Thread Martin Maechler
> Henrik Bengtsson > on Fri, 3 Mar 2017 10:10:53 -0800 writes: > On Fri, Mar 3, 2017 at 9:55 AM, Hadley Wickham > wrote: >>> But, how you propose a warning-to-error transition >>> should be made without wreaking havoc? Just flip the >>> switch in R-devel and see

Re: [Rd] Control statements with condition with greater than one should give error (not just warning) [PATCH]

2017-03-03 Thread Martin Maechler
" Here: The way to R hell starts (or "widens", your choice) by introducing options() that influence basic language semantics !! For robust code you will start to test all code of R for all different possible combinations of these options set I am sure you would not wa

Re: [Rd] Bug in nlm()

2017-03-03 Thread Martin Maechler
eedback from "the public". Of course, I could be wrong.. and happy if you explain / tell me why. Best, Martin Maechler > Thank you in advance. > Kind regards, > Marie B�hnstedt > Marie B�hnstedt, MSc > Research Scientist > Max Planck Institute

Re: [Rd] stats::median

2017-03-01 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Mon, 27 Feb 2017 10:42:19 +0100 writes: >>>>> Rob J Hyndman >>>>> on Wed, 15 Feb 2017 21:48:56 +1100 writes: >> The generic stats::median method is defined as median <- >&g

Re: [Rd] Test suite failures in R-devel_2017-02-25_r72256

2017-02-28 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Mon, 27 Feb 2017 16:08:40 +0100 writes: >>>>> Peter Simons >>>>> on Mon, 27 Feb 2017 10:30:39 +0100 writes: >> Hi, I tried compiling the latest pre-release for R 3.3.3 >> for

Re: [Rd] Test suite failures in R-devel_2017-02-25_r72256

2017-02-27 Thread Martin Maechler
> Peter Simons > on Mon, 27 Feb 2017 10:30:39 +0100 writes: > Hi, I tried compiling the latest pre-release for R 3.3.3 > for the NixOS Linux distribution [1], but the build fails > during the "make check" phase because of the following 2 > issues: > 1) The "tools"

Re: [Rd] stats::median

2017-02-27 Thread Martin Maechler
king any code". In spite of all that *and* the perennial drawback that a '...' will allow argument name typos to go unnoticed I agree you have a good argument nowadays, that median() should be the same as many similar "basic statistics" R

Re: [Rd] rep/rep.int: in NEWS, but not yet ported from trunk

2017-02-27 Thread Martin Maechler
out bug report, and your proposal to make the simple case rep(s, list(7)) work as previously seems ok to me. However, for all this, we will concentrate on R-devel (to become R 3.4.0). Best regards, Martin Maechler __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Update copyright year in manuals

2017-02-25 Thread Martin Maechler
> On Thu, Feb 23, 2017 at 03:23:10PM +0100, Martin Maechler wrote: > > >>>>> Mikko Korpela > > >>>>> on Thu, 23 Feb 2017 14:02:58 +0200 writes: > > > > > With new R releases soon to come, I suggest updating the > &

Re: [Rd] Update copyright year in manuals

2017-02-23 Thread Martin Maechler
> Mikko Korpela > on Thu, 23 Feb 2017 14:02:58 +0200 writes: > With new R releases soon to come, I suggest updating the > Rcopyright macro in "doc/manual/R-defs.texi" to use year > 2017. Now this is an e-mail that *REALLY* does not fit to the R-devel mailing list ... even

Re: [Rd] possible improvement to ?with examples

2017-02-21 Thread Martin Maechler
> Ben Bolker > on Thu, 16 Feb 2017 15:37:13 -0500 writes: > A querent on StackOverflow asked about the with() function > http://stackoverflow.com/questions/42283479/why-when-to-use-with-function#42283479 > and asked about the example in ?with > library(MASS) > w

Re: [Rd] Wish List: Extensions to the derivatives table

2017-02-20 Thread Martin Maechler
> > The issue is that without an extensible derivative table or the proposed > extensions, it is not possible to automatically produce (without manual > modification of the deriv3 output) a function that avoids catastrophic > cancellation regardless of the working range. > Manual modification i

Re: [Rd] another fix for R crashes under enable-strict-barrier, lto, trunk@72156

2017-02-20 Thread Martin Maechler
> Hin-Tak Leung > on Sat, 11 Feb 2017 19:30:26 + writes: > I haven' t touched R for some 18 months, and so I have no > idea if this is a recent problems or not; but it certainly > did not segfault two years ago. Since it has been > crashing (segfault) under 'make

Re: [Rd] Grapics Device Resolution Limits

2017-02-10 Thread Martin Maechler
the help page of devices doesn't explain that there are any limits or how > they are determined. The wording of the error message could also be improved, > to explain that the resolution is too high or the dimensions are too large. If one/some of those who can reproduce the problem in

Re: [Rd] R CMD check error (interfacing to C API of other pkg)

2017-02-10 Thread Martin Maechler
> Therneau, Terry M , Ph D > on Thu, 9 Feb 2017 12:56:17 -0600 writes: > Martyn, > No, that didn't work. > One other thing in the mix (which I don't think is the issue) is that I call one of the > C-entry points of expm. So the DESCRIPTION file imports expm, the NA

Re: [Rd] Ancient C /Fortran code linpack error

2017-02-09 Thread Martin Maechler
s with NaN/Inf. ----- Last but not least : If you are not afraid of +/- Inf, but really only of NA/NaN's (as the OP said), then note that "THE manual" (= "Writing R Extensions") does mention ISNAN(.) almost in the same place as the first occurence of R_FINITE(.). Best regards, Martin Maechler, ETH Zurich __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] package load altering RNG state

2017-02-07 Thread Martin Maechler
> Henric Winell > on Tue, 7 Feb 2017 13:37:42 +0100 writes: > Hi, On 2017-02-07 13:12, Benjamin Tyner wrote: >> Hello >> >> When loading a package, I'm wondering if it's frowned >> upon for the package to alter the state of the random >> number generator? I g

Re: [Rd] Lack of 'seq_len' in 'head' in 'stopifnot'

2017-02-04 Thread Martin Maechler
> Suharto Anggono Suharto Anggono via R-devel > on Sat, 4 Feb 2017 10:18:33 + writes: > Function 'stopifnot' in R devel r72104 has this. > head <- function(x, n = 6L) ## basically utils:::head.default() > x[if(n < 0L) max(length(x) + n, 0L) else min(n, length

Re: [Rd] RFC: tapply(*, ..., init.value = NA)

2017-02-04 Thread Martin Maechler
e mode (0 for raw) is automatically used." After some thought (and experiments), I have reverted and no longer use if(missing). You are right that it is not needed (and even potentially confusing) here. Changes are in svn c72106. Martin Maechler > --

Re: [Rd] Typos in manuals

2017-02-02 Thread Martin Maechler
> Mikko Korpela > on Wed, 1 Feb 2017 12:16:49 +0200 writes: > I found some trivial typos, mostly unmatched parentheses, in the R > manuals. More information and suggested fixes are in the attached diff file. Thank you very much! They have been applied to the R-devel and R-pa

Re: [Rd] Unexpected EOF in R-patched_2017-01-30

2017-02-01 Thread Martin Maechler
> Avraham Adler > on Tue, 31 Jan 2017 16:07:20 -0500 writes: > On Tue, Jan 31, 2017 at 3:30 PM, peter dalgaard wrote: >> >>> On 31 Jan 2017, at 18:56 , Avraham Adler wrote: >>> >>> Hello. >>> >>> When trying to unpack today's version of R-patched,

Re: [Rd] RFC: tapply(*, ..., init.value = NA)

2017-01-31 Thread Martin Maechler
> Suharto Anggono Suharto Anggono via R-devel > on Tue, 31 Jan 2017 15:43:53 + writes: > Function 'aggregate.data.frame' in R has taken a different route. With drop=FALSE, the function is also applied to subset corresponding to combination of grouping variables that doesn't

Re: [Rd] RFC: tapply(*, ..., init.value = NA)

2017-01-28 Thread Martin Maechler
>>>>> Henrik Bengtsson >>>>> on Fri, 27 Jan 2017 09:46:15 -0800 writes: > On Fri, Jan 27, 2017 at 12:34 AM, Martin Maechler > wrote: >> >> > On Jan 26, 2017 07:50, "William Dunlap via R-devel" >> >

Re: [Rd] RFC: tapply(*, ..., init.value = NA)

2017-01-27 Thread Martin Maechler
> Suharto Anggono Suharto Anggono via R-devel > on Fri, 27 Jan 2017 16:36:59 + writes: > The "no factor combination" case is distinguishable by 'tapply' with simplify=FALSE. >> D2 <- data.frame(n = gl(3,4), L = gl(6,2, labels=LETTERS[1:6]), N=3) >> D2 <- D2[-c(1,5), ]

Re: [Rd] Undefined behavior of head() and tail() with n = 0

2017-01-27 Thread Martin Maechler
advantages are not even getting close to counter-weigh the drawbacks. > On 26 January 2017 at 16:51, William Dunlap wrote: >> In addition, signed zeroes only exist for floating point numbers - the >> bit patterns for as.integer(0) and as.integer(-0) are identical. inde

Re: [Rd] RFC: tapply(*, ..., init.value = NA)

2017-01-27 Thread Martin Maechler
mode(ans[[1]])) else NA . A colleague proposed to use the shorter argument name 'default' instead of 'init.value' which indeed maybe more natural and still not too often used as "non-first" argument in FUN(.). Thank you for the constructive feedbac

[Rd] RFC: tapply(*, ..., init.value = NA)

2017-01-26 Thread Martin Maechler
Last week, we've talked here about "xtabs(), factors and NAs", -> https://stat.ethz.ch/pipermail/r-devel/2017-January/073621.html In the mean time, I've spent several hours on the issue and also committed changes to R-devel "in two iterations". In the case there is a *Left* hand side part to xt

Re: [Rd] Undefined behavior of head() and tail() with n = 0

2017-01-26 Thread Martin Maechler
t here... but of course we can continue discussing here if you like. Martin Maechler ETH Zurich and R Core > and the R head() and tail() functions are modeled after > their GNU counterparts, I would expect the R functions to > distinguish between +0 and -0 >> tai

Re: [Rd] xtabs(), factors and NAs

2017-01-20 Thread Martin Maechler
>>>>> Milan Bouchet-Valat >>>>> on Thu, 19 Jan 2017 13:58:31 +0100 writes: > Hi all, > I know this issue has been discussed a few times in the past already, > but Martin Maechler suggested in a bug report [1] that I raise it here. > > Basicall

Re: [Rd] accelerating matrix multiply

2017-01-10 Thread Martin Maechler
cite above, the current implementation was triggered by a nasty BLAS bug .. actually also showing up only on some platforms, possibly depending on runtime libraries in addition to the compilers used. Do you have R code (including set.seed(.) if relevant) to show on how to generate the large square matri

Re: [Rd] seq.int/seq.default

2017-01-06 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Thu, 5 Jan 2017 12:39:29 +0100 writes: >>>>> Mick Jordan >>>>> on Wed, 4 Jan 2017 08:15:03 -0800 writes: >> On 1/4/17 1:26 AM, Martin Maechler wrote: >>>>>>>&g

Re: [Rd] seq.int/seq.default

2017-01-05 Thread Martin Maechler
> Mick Jordan > on Wed, 4 Jan 2017 12:49:41 -0800 writes: > On 1/4/17 8:15 AM, Mick Jordan wrote: > Here is another difference that I am guessing is unintended. >> y <- seq.int(1L, 3L, length.out=2) >> typeof(y) > [1] "double" >> x <- seq.default(1L, 3L, lengt

Re: [Rd] seq.int/seq.default

2017-01-05 Thread Martin Maechler
>>>>> Mick Jordan >>>>> on Wed, 4 Jan 2017 08:15:03 -0800 writes: > On 1/4/17 1:26 AM, Martin Maechler wrote: >>>>>>> Mick Jordan >>>>>>> on Tue, 3 Jan 2017 07:57:15 -0800 writes: >> > This i

Re: [Rd] seq.int/seq.default

2017-01-04 Thread Martin Maechler
o) : default method not implemented for type 'symbol' which I find a very appropriate and helpful message > seq.int(to=quote(b), by=2) > Error in seq.int(to = quote(b), by = 2) : > 'to' cannot be NA, NaN or infinite which is true, as well, and there

Re: [Rd] utils::ls.str(): Partial argument name 'digits' to seq() (should be digits.d?)

2017-01-03 Thread Martin Maechler
You are right (though picky). I have updated it now. Thank you Henrik! Martin > Should utils::ls.str() be updated as: > svn diff src/library/utils/R/str.R > Index: src/library/utils/R/str.R > === > --- src/library/utils/R/str.R (re

[Rd] structure(NULL, *) is deprecated [was: Unexpected I(NULL) output]

2016-12-29 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Thu, 22 Dec 2016 10:24:43 +0100 writes: >>>>> Florent Angly >>>>> on Tue, 20 Dec 2016 13:42:37 +0100 writes: >> Hi all, >> I believe there is an issue with passing NULL to the

Re: [Rd] colnames for data.frame could be greatly improved

2016-12-29 Thread Martin Maechler
ic that do.NULL = FALSE is relatively slow? Shorter code *is* nicer than longer code, so I need a bit more conviction why we should add more code for that special case .. Martin Maechler, ETH Zurich > On 20 December 2016 at 01:27, Jan Gorecki wrote: > > Hello, > > > > col

Re: [Rd] Unexpected I(NULL) output

2016-12-22 Thread Martin Maechler
st option would be 3/ The help page for I() could note what happens in the NULL case. That would be the least work for everyone, but at the moment, I tend to agree that '1/' is worth the pain to have R's structure() become more consistent. Martin Maechler ETH Zurich > My s

Re: [Rd] Very small numbers in hexadecimal notation parsed as zero

2016-12-21 Thread Martin Maechler
> Florent Angly > on Tue, 20 Dec 2016 13:26:36 +0100 writes: > Hi all, > I have noticed incorrect parsing of very small hexadecimal numbers > like "0x1.dp-987". Such a hexadecimal representation can > can be produced by sprintf() using the %a flag. The retu

Re: [Rd] Request: Increasing MAX_NUM_DLLS in Rdynload.c

2016-12-20 Thread Martin Maechler
to me... in so far as the general feeling is that memory should be cheap and limits should not be low. (In spite of Brian Ripleys good reasons against it, I'd still aim for a *dynamic*, i.e. automatically increased list here). Martin Maechler > Regards, > Steve Bronder

Re: [Rd] print.POSIXct doesn't seem to use tz argument, as per its example

2016-12-16 Thread Martin Maechler
> Jennifer Lyon > on Thu, 15 Dec 2016 09:33:30 -0700 writes: > On the documentation page for DateTimeClasses, in the Examples section, > there are the following two lines: > > format(.leap.seconds) # the leap seconds in your time zone > print(.leap.seconds, tz = "PST8PDT") #

Re: [Rd] New leap second end of 2016 / beginning 2017 (depending on TZ)

2016-12-15 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Wed, 14 Dec 2016 17:04:22 +0100 writes: > As R is sophisticated enough to track leap seconds, > ?.leap.seconds > we'd need to update our codes real soon now again: > https://en.wikipedia.org/wik

[Rd] New leap second end of 2016 / beginning 2017 (depending on TZ)

2016-12-14 Thread Martin Maechler
As R is sophisticated enough to track leap seconds, ?.leap.seconds we'd need to update our codes real soon now again: https://en.wikipedia.org/wiki/Leap_second (and those of you who want second precision in R in 2017 need to start working with 'R patched' or 'R devel' ...) _

Re: [Rd] Strange behavior when using progress bar (Fwd: Re: [R] The code itself disappears after starting to execute the for loop)

2016-12-07 Thread Martin Maechler
is possibly only for you! Note that I do *not* see problems on Linux (in ESS; did not try RStudio). Please also indicate in which form you are running R. Here it does depend if this is inside RStudio, ESS, the "Windows GUI", the "Windows terminal", ... Martin Maechler, ETH Zur

Re: [Rd] segfault with POSIXlt zone=NULL zone=""

2016-12-06 Thread Martin Maechler
> Joshua Ulrich > on Tue, 6 Dec 2016 09:51:16 -0600 writes: > On Tue, Dec 6, 2016 at 6:37 AM, wrote: >> Hi all, >> >> I ran into a segfault while playing with dates. >> >> $ R --no-init-file >> ... >> > library(lubridate); d=as.POSIXlt(floor_date(Sy

<    2   3   4   5   6   7   8   9   10   11   >