Re: [R] readline in function call with space in prompt.

2021-02-17 Thread Jeremie Juste
Hello, Sorry for the delayed reply and thanks for your feedback. I noticed this problem both on Linux and on Windows. Thanks for leading me to the solution. I'm on R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out". A common factor between the Windows and the Linux session is Emacs ESS.

Re: [R] readline in function call with space in prompt.

2021-02-09 Thread Karl Ropkins
Not on a machine with latest R at moment so not ruling out something there, but it is working fine for me. Karl R version 4.0.2 (2020-06-22) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19041) -- Message: 9 Date: Tue, 9 Feb 2021

Re: [R] readline in function call with space in prompt.

2021-02-09 Thread Michael Dewey
The function test as defined below by Jeremie works as I would have expected for me on Windows so I am unable to replicate the problem there. R version 4.0.3 (2020-10-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19041) Matrix products: default locale: [1]

Re: [R] readline in function call with space in prompt.

2021-02-09 Thread Martin Maechler
> Jeremie Juste > on Mon, 08 Feb 2021 14:28:33 +0100 writes: > Hello, > I have noticed a behavior that I don't understand. When I call the > following function from the prompt. > test <- function(){ > a <- readline("selection: ") > a > } >> test()

Re: [R] readline in function call with space in prompt.

2021-02-08 Thread Rolf Turner
On Mon, 08 Feb 2021 14:28:33 +0100 Jeremie Juste wrote: > Hello, > > I have noticed a behavior that I don't understand. When I call the > following function from the prompt. > test <- function(){ > a <- readline("selection: ") > a > } > > > test() > > selection: | > I can only type

Re: [R] readline in function call with space in prompt.

2021-02-08 Thread Jim Lemon
Hi Jeremie, Try this: test <- function() { a<-readline("selection: ") return(a) } If it starts working, it could be a difference in the way Windows R handles text input. Both work okay for me on fedora linux. Jim On Tue, Feb 9, 2021 at 12:29 AM Jeremie Juste wrote: > > Hello, > > I have

[R] readline in function call with space in prompt.

2021-02-08 Thread Jeremie Juste
Hello, I have noticed a behavior that I don't understand. When I call the following function from the prompt. test <- function(){ a <- readline("selection: ") a } > test() > selection: | I can only type one character and the readline function exits before I can press enter. however