Re: [Rd] readLines function with R >= 3.5.0

2018-05-28 Thread Martin Maechler
> Ralf Stubner > on Mon, 28 May 2018 12:13:57 +0200 writes: > On 28.05.2018 11:07, Gábor Csárdi wrote: >> stdin() is not the same as file("stdin"), see the note in ?stdin. Of course it is not the same, otherwise using one for the other had no effect, but you are right: it is

Re: [Rd] readLines function with R >= 3.5.0

2018-05-28 Thread Ralf Stubner
On 28.05.2018 11:07, Gábor Csárdi wrote: > stdin() is not the same as file("stdin"), see the note in ?stdin. In particular stdin() works in an interactive session but not when R -f / Rscript is used, since it does not wait for the user to input anything: $ R -f readLines.R R version 3.5.0 (2018-

Re: [Rd] readLines function with R >= 3.5.0

2018-05-28 Thread Gábor Csárdi
stdin() is not the same as file("stdin"), see the note in ?stdin. Gabor On Mon, 28 May 2018, 10:41 Martin Maechler, wrote: > > Martin Maechler > > on Mon, 28 May 2018 10:28:01 +0200 writes: > > > Ralf Stubner > > on Fri, 25 May 2018 19:18:58 +0200 writes: > > >> Dear

Re: [Rd] readLines function with R >= 3.5.0

2018-05-28 Thread Martin Maechler
> Martin Maechler > on Mon, 28 May 2018 10:28:01 +0200 writes: > Ralf Stubner > on Fri, 25 May 2018 19:18:58 +0200 writes: >> Dear all, I would like to draw you attention to this >> question on SO: >> https://stackoverflow.com/questions/50372043/readlines-fu

Re: [Rd] readLines function with R >= 3.5.0

2018-05-28 Thread Martin Maechler
> Ralf Stubner > on Fri, 25 May 2018 19:18:58 +0200 writes: > Dear all, I would like to draw you attention to this > question on SO: > https://stackoverflow.com/questions/50372043/readlines-function-with-new-version-of-r > Based on the OP's code I used the script

[Rd] Buffering in R 3.5 connections causes incorrect data in readChar

2018-05-28 Thread Aaron Goodman
I noticed an issue where readChar does not return the correct value after a call to readline. It appears that readChar is not aware of the buffering, so it reads from the end of the buffer, rather than the current position in the file. This is a significant change of behavior from R-3.4.4. Below i