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.
:21:58 +1300
From: Rolf Turner
To: Jeremie Juste
Cc: r-help@r-project.org
Subject: Re: [R] readline in function call with space in prompt.
Message-ID: <20210209102158.5b04117d@rolf-Latitude-E7470>
Content-Type: text/plain; charset="windows-1252"
On Mon, 08 Feb 2021 14:28:33 +01
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]
> 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()
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 on
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 noti
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
test
7 matches
Mail list logo