[Rd] Stability and reliability of R (comment on Re: as.vector() broken on a matrix or array of type "list")

2018-09-26 Thread MacQueen, Don via R-devel
With regard to Martin's comment about the strength of (base) R: I have R code I wrote 15+ years ago that has been used regularly ever since with only a few minor changes needed due to changes in R. Within that code, I find particularly impressive for its stability a simple custom GUI that uses

Re: [Rd] svg ignores cex.axis in R3.5.1 on macOS

2018-09-05 Thread MacQueen, Don via R-devel
Seems ok on my system. Axis label size changes when cex.axis does. ## tested in the middle of another long session, so many additional packages are attached, including some personal packages not available elsewhere > sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0

Re: [Rd] Date class shows Inf as NA; this confuses the use of is.na()

2018-06-08 Thread MacQueen, Don via R-devel
> as_date Error: object 'as_date' not found Must be from some not-named package... But don't confuse the format of an object when printed with its underlying value: > as.Date(Inf,origin = '1970-01-01') [1] NA > str(as.Date(Inf,origin = '1970-01-01')) Date[1:1], format: NA > as.numeric(as.Dat

Re: [Rd] Improving string concatenation

2015-06-18 Thread MacQueen, Don
At the risk of unnecessarily (annoyingly?) prolonging a conversation that has died down... I don't think I've seen the sep or collapse arguments to paste mentioned as aspects to consider. I don't see any way in which this version of '+' could offer those arguments. Hence I would consider this vers

Re: [Rd] Proposing a change in the base::sink interface for type argument

2015-03-18 Thread MacQueen, Don
It's only an illusion until one actually tries providing a vector. > sink('foo', type=c('s','m')) Error in match.arg(type) : 'arg' must be of length 1 The additional benefit of match.arg() which you may have not appreciated is that it allows the user to abbreviate. That is, > sink('foo', ty

Re: [Rd] Problem with order() and I()

2014-09-10 Thread MacQueen, Don
NA in both cases, >would mean that order(ch) also should give an error as order(foo) >{{ an error we should improve the message in any case!!}. >Big Q: Can we afford order(ch) giving an error in such cases. >Pretty high chance that this will "break" much user (and probably

Re: [Rd] Problem with order() and I()

2014-09-09 Thread MacQueen, Don
You are welcome. -Don Sent with Good (www.good.com) -Original Message- From: Martin Maechler [maech...@stat.math.ethz.ch<mailto:maech...@stat.math.ethz.ch>] Sent: Tuesday, September 09, 2014 07:19 AM Pacific Standard Time To: MacQueen, Don Cc: R-devel@r-project.org Subject: R

[Rd] Problem with order() and I()

2014-09-08 Thread MacQueen, Don
I have found that order() fails in a rather arcane circumstance, as in this example: > foo <- I( c('x','\265g') ) > order(foo) Error in if (xi > xj) 1L else -1L : missing value where TRUE/FALSE needed > foo <-c('x','\265g') > order(foo) [1] 1 2 > sessionInfo() R version 3.1.1 (2014-07-10) Platf

Re: [Rd] how to draw scatter plots (etc) with streaming data

2014-02-28 Thread MacQueen, Don
I'm not sure whether R-help or R-devel is appropriate... But here's a little simulation to help get you started with the plotting part: plot( c(1,100) , c(-6,6), type='n') for (x in 1:100) {points(x, rnorm(1)) ; Sys.sleep(1)} -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 E

Re: [Rd] I wish xlim=c(0, NA) would work. How about I send you a patch?

2012-04-19 Thread MacQueen, Don
Another potential problem with the xlim=c(5,NA) type of approach is that if I am calculating the limits (as I often do) and have a bug in my calculation, such that I get an NA for one of the limits, then my plot would succeed rather than fail -- and succeed with hard to predict results. This will m