> On Dec 20, 2016, at 12:37 AM, Atte Tenkanen wrote:
>
> Hi,
>
> How to get scan(file="") command to ask my input from the keyboard?
>
> If I put the command straight to the console it works
>
> > X1 <- scan(n=1)
> 1: 22
> Read 1 item
>
> but as a part of a program it just continues without
No clue.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Dec 20, 2016 at 8:11 AM, Atte Tenkanen wrote:
> Hi Bert,
>
> I tried using the function
Hi Bert,
I tried using the function, but still the same problem. If there is
something after the scan-line, scan does not let me to enter any input
but the program just run forward like before.
I have OSX 10.9.5. and R 3.3.2.
Atte
20.12.2016, 17.19, Bert Gunter kirjoitti:
??
f <- functio
??
> f <- function() {X <- scan(n =1); X}
> f()
1: 3
Read 1 item
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Dec 20, 2016 at 12:37 AM, Atte
Hi,
How to get scan(file="") command to ask my input from the keyboard?
If I put the command straight to the console it works
> X1 <- scan(n=1)
1: 22
Read 1 item
but as a part of a program it just continues without asking my value?
> X1 <- scan(n=1)
1:
Read 0 items
Yours,
Atte Tenkanen
___
5 matches
Mail list logo