nicholas.wray at ntlworld.com
2015-Oct-12 13:33 UTC
[R] Command to input a variable value in real time
Hi I am sure that there is a command in R which tells the prog to wait until you have input a value for a variable, but for the life of me I can't find it. Searches on the net only seem to talk about inputting datasets etc, not about real time single inputs. I'd be most grateful if anyone could point me in the right direction Thanks, Nick Wray [[alternative HTML version deleted]]
Franklin Bretschneider
2015-Oct-12 13:44 UTC
[R] Command to input a variable value in real time
Dear nicholas.wray, Re:> Hi I am sure that there is a command in R which tells the prog to wait until > you have input a value for a variable, but for the life of me I can't find it. > Searches on the net only seem to talk about inputting datasets etc, not about > real time single inputs. I'd be most grateful if anyone could point me in the > right direction > > Thanks, Nick Wray > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.Maybe you need "readline()" in base-R:> > readline {base} R Documentation > Read a Line from the Terminal > > Description > > readline reads a line from the terminal (in interactive use). > > Usage > > readline(prompt = "") > > Arguments > > prompt > the string printed when prompting the user for input. Should usually end with a space " ". >Best wishes, Frank --- Franklin Bretschneider Dept of Biology Utrecht University bretschr at xs4all.nl
Dear Nick, You might find the function varEntryDialog() useful: http://www.r-bloggers.com/user-input-using-tcltk-2/ HTH, Ivan -- Ivan Calandra, PhD University of Reims Champagne-Ardenne GEGENAA - EA 3795 CREA - 2 esplanade Roland Garros 51100 Reims, France +33(0)3 26 77 36 89 ivan.calandra at univ-reims.fr https://www.researchgate.net/profile/Ivan_Calandra Le 12/10/15 15:33, nicholas.wray at ntlworld.com a ?crit :> Hi I am sure that there is a command in R which tells the prog to wait until > you have input a value for a variable, but for the life of me I can't find it. > Searches on the net only seem to talk about inputting datasets etc, not about > real time single inputs. I'd be most grateful if anyone could point me in the > right direction > > Thanks, Nick Wray > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
See this link for the function varEntryDialog() itself: http://www.r-bloggers.com/user-input-using-tcltk/ Ivan Le 12/10/15 15:57, Ivan Calandra a ?crit :> Dear Nick, > > You might find the function varEntryDialog() useful: > http://www.r-bloggers.com/user-input-using-tcltk-2/ > > HTH, > Ivan > > -- > Ivan Calandra, PhD > University of Reims Champagne-Ardenne > GEGENAA - EA 3795 > CREA - 2 esplanade Roland Garros > 51100 Reims, France > +33(0)3 26 77 36 89 > ivan.calandra at univ-reims.fr > https://www.researchgate.net/profile/Ivan_Calandra > > Le 12/10/15 15:33, nicholas.wray at ntlworld.com a ?crit : >> Hi I am sure that there is a command in R which tells the prog to >> wait until >> you have input a value for a variable, but for the life of me I can't >> find it. >> Searches on the net only seem to talk about inputting datasets etc, >> not about >> real time single inputs. I'd be most grateful if anyone could point >> me in the >> right direction >> >> Thanks, Nick Wray >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >