Re: [Rd] embeded R application on Windows prints broken character.

2018-04-26 Thread David Winsemius
> On Apr 26, 2018, at 4:25 PM, Randy Lai wrote: > > The issue was reported to me for https://github.com/randy3k/rtichoke/issues/50 > which is a python program which embeds R and provides a interface to R. > > With R 3.5, for reason which i don't understand, when I typed `"a"` in the > console

[Rd] embeded R application on Windows prints broken character.

2018-04-26 Thread Randy Lai
The issue was reported to me for https://github.com/randy3k/rtichoke/issues/50 which is a python program which embeds R and provides a interface to R. With R 3.5, for reason which i don't understand, when I typed `"a"` in the console STDOUT got `"\x02\xff\xfea\x03\xff\xfe"` with the extra escaped

Re: [Rd] readLines() for non-blocking pipeline behaves differently in R 3.5

2018-04-26 Thread Michael Lawrence
Thanks for the clear explanation. At first glance seeking to the current position seemed like it would be a no-op, but obviously things are more complicated under the hood. On Thu, Apr 26, 2018 at 11:35 AM, Gábor Csárdi wrote: > I suspect the reason for the seek is this: > > cat("1\n", file = "fo

Re: [Rd] readLines() for non-blocking pipeline behaves differently in R 3.5

2018-04-26 Thread Gábor Csárdi
I suspect the reason for the seek is this: cat("1\n", file = "foobar") f <- file("foobar", blocking = FALSE, open = "r") readLines(f) #> [1] "1" cat("2\n", file = "foobar", append = TRUE) readLines(f) #> [1] "2" cat("3\n", file = "foobar", append = TRUE) readLines(f) #> [1] "3" I.e. R can emul

Re: [Rd] readLines() for non-blocking pipeline behaves differently in R 3.5

2018-04-26 Thread Michael Lawrence
The issue is that readLines() tries to seek (for reasons I don't understand) in the non-blocking case, but silently fails for "stdin" since it's a stream. This confused the buffering logic. The fix is to mark "stdin" as unable to seek, but I do wonder why readLines() is seeking in the first place.

Re: [Rd] mean(x) for ALTREP

2018-04-26 Thread Gabe Becker
Serguei, The R 3.5.0 release includes the fundamental ALTREP framework but does not include many 'hooks' within R's source code to make use of methods on the ALTREP custom vector classes. I have implemented a fair number, including for mean() to use the custom Sum method when available, in the ALT

Re: [Rd] Bug in RScript.exe for 3.5.0

2018-04-26 Thread Tomas Kalibera
Thanks, actually this is because the snapshot build is still one version behind (74642, the fix is in 74643). When I build my own installer and install it seems to be working fine. Sorry for the confusion, Tomas On 04/26/2018 02:49 PM, Kerry Jackson wrote: Hi Tomas, Thanks for the info about

Re: [Rd] Bug in RScript.exe for 3.5.0

2018-04-26 Thread Kerry Jackson
Hi Tomas, Thanks for the info about the binary builds; I did install it, however the bug still seems to be there in the current build. The workaround you suggested does work: C:\>"C:\Program Files\R\R-devel\bin\x64\Rscript.exe" "C:\foo bar.R" Fatal error: cannot open file 'C:\foo': No such fil

Re: [Rd] Bug in RScript.exe for 3.5.0

2018-04-26 Thread Kerry Jackson
Thanks Tomas. I confirm the quick workaround works for me in the DOS prompt, and when having a shortcut to RScript in SendTo, and when used in the Task Scheduler. I have not tested the R-devel version, due to my unfamiliarity with installing from source code. -Original Message- From:

Re: [Rd] Bug in RScript.exe for 3.5.0

2018-04-26 Thread Tomas Kalibera
On 04/26/2018 02:23 PM, Kerry Jackson wrote: Thanks Tomas. I confirm the quick workaround works for me in the DOS prompt, and when having a shortcut to RScript in SendTo, and when used in the Task Scheduler. I have not tested the R-devel version, due to my unfamiliarity with installing from

Re: [Rd] Bug in RScript.exe for 3.5.0

2018-04-26 Thread Tomas Kalibera
Fixed in R-devel. I will port to R-patched after more testing. Tomas On 04/26/2018 01:52 AM, Tomas Kalibera wrote: Thanks for the report. A quick workaround before this gets fixed is to add an extra first argument that has no space in it, e.g. Rscript --vanilla "foo bar.R" The problem exists

[Rd] mean(x) for ALTREP

2018-04-26 Thread Serguei Sokol
Hi, By looking at a doc about ALTREP https://svn.r-project.org/R/branches/ALTREP/ALTREP.html (by the way congratulations for that and for R-3.5.0 in general), I was a little bit surprised by the following example: > x <- 1:1e10 > system.time(print(mean(x))) [1] 5e+09    user  system elapsed

Re: [Rd] extendrange(): suggested improvement

2018-04-26 Thread Martin Maechler
> Marius Hofert > on Wed, 25 Apr 2018 17:31:01 -0400 writes: > Hi, > I often need to extend the plot range to the right, but not to the > left (for example: not below 0 so that log = "x" still works...). This > could be a handy improvement of extendrange(): > ---