Re: [R] Pause script at input from terminal (interactive use)

2019-04-23 Thread Luigi Marongiu
> > From: R-help On Behalf Of Luigi Marongiu > > Sent: Thursday, April 18, 2019 4:11 PM > > To: r-help > > Subject: [R] Pause script at input from terminal (interactive use) > > > > Dear all, > > I am trying to write an interactive script where the user t

Re: [R] Pause script at input from terminal (interactive use)

2019-04-23 Thread PIKAL Petr
Hi Maybe you could think about transfering **script** to **function**. In function your construction seems to be OK. Cheers Petr > -Original Message- > From: R-help On Behalf Of Luigi Marongiu > Sent: Thursday, April 18, 2019 4:11 PM > To: r-help > Subject: [R] Pause

Re: [R] Pause script at input from terminal (interactive use)

2019-04-19 Thread Bernard Comcast
I have used the shiny package to create a web page user interface and it works well. Bernard Sent from my iPhone so please excuse the spelling!" > On Apr 19, 2019, at 1:12 AM, Luigi Marongiu wrote: > > I am realizing as well that R is not the best option for an > interactive session. I

Re: [R] Pause script at input from terminal (interactive use)

2019-04-19 Thread Ivan Krylov
On Thu, 18 Apr 2019 16:10:41 +0200 Luigi Marongiu wrote: > It is possible to launch R scritps in the interactive mode in the > first place? and if yes, how? One option would be to use littler with its -i (--interactive) option. -- Best regards,

Re: [R] Pause script at input from terminal (interactive use)

2019-04-18 Thread Luigi Marongiu
I am realizing as well that R is not the best option for an interactive session. I changed the script to get the input from a config file; it is less elegant because the procedure now requires double the files than with CLI input, but at the end of the day is more practical when most of the answer

Re: [R] Pause script at input from terminal (interactive use)

2019-04-18 Thread Greg Snow
I am not an expert on Rscript, but I don't think that an actual terminal is ever used when using Rscript. And `interactive()` will probably always be false. So if you want the script to pause for input, you need to have some form of user interface to work with. One option is to use the tcltk

[R] Pause script at input from terminal (interactive use)

2019-04-18 Thread Luigi Marongiu
Dear all, I am trying to write an interactive script where the user type some input from the terminal. I used readline() but when I launch the file with Rscript, the function is overwritten directly, there is no waiting for the user's input. For instance, this example: VAR1 =