[R] User input in R program

2011-01-21 Thread christiaan pauw
HI Everybody

Does anyone know of documentation about different ways of obtaining user
input in R. I have used readline() but I wondered is there are sophisticated
packages that does things like validate answers or generate selection
lists.

bets regards
Christaan

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] User input in R program

2011-01-21 Thread Hugo Mildenberger
Hello Christian,

for an example of interacting with graphic output, just run

example(getGraphicsEvent)

However, on X11, that feature had ceased to work since a pre-release 
of R-2.12 if Cairo support was enabled at compile time. The reason for 
this defect had already been documented in R's bugs database for long. 
Maybe getGraphicsEvent still runs on Windows.

Best 

Hugo

On Friday 21 January 2011 13:26:26 christiaan pauw wrote:
 HI Everybody
 
 Does anyone know of documentation about different ways of obtaining user
 input in R. I have used readline() but I wondered is there are sophisticated
 packages that does things like validate answers or generate selection
 lists.
 
 bets regards
 Christaan
 
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org mailing list
 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@r-project.org mailing list
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.


Re: [R] User input in R program

2011-01-21 Thread Matt Shotwell
Martyn Plummer's 'coda' package has some nice interactive menus. The
package appears to be written entirely in R. You could start with the
codamenu() function in the package source:

http://cran.r-project.org/web/packages/coda/index.html

-Matt

On Fri, 2011-01-21 at 14:26 +0200, christiaan pauw wrote:
 HI Everybody
 
 Does anyone know of documentation about different ways of obtaining user
 input in R. I have used readline() but I wondered is there are sophisticated
 packages that does things like validate answers or generate selection
 lists.
 
 bets regards
 Christaan
 
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org mailing list
 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@r-project.org mailing list
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.


Re: [R] User input in R program

2011-01-21 Thread D Kelly O'Day

Christian

Have you looked at the  http://www.stats.gla.ac.uk/~adrian/rpanel/ rpanel 
package?

I have a post which shows an example of interactive input that allows user
to adjust plot parameters.
http://chartsgraphs.wordpress.com/2009/05/08/rpanel-package-adds-interactive-capabilites-to-r/
 
link 
-- 
View this message in context: 
http://r.789695.n4.nabble.com/User-input-in-R-program-tp3229515p3229738.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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.


Re: [R] User input in R program

2011-01-21 Thread Mauricio Zambrano
Probably, iplots may be useful for you:

http://cran.r-project.org/web/packages/iplots/index.html

Kinds,

Mauricio
-- 
===
Linux user #454569 -- Ubuntu user #17469
===

2011/1/21 christiaan pauw cjp...@gmail.com:
 HI Everybody

 Does anyone know of documentation about different ways of obtaining user
 input in R. I have used readline() but I wondered is there are sophisticated
 packages that does things like validate answers or generate selection
 lists.

 bets regards
 Christaan

        [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 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@r-project.org mailing list
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.


Re: [R] User input in R program

2011-01-21 Thread jverzani
christiaan pauw cjpauw at gmail.com writes:

 
 HI Everybody
 
 Does anyone know of documentation about different ways of obtaining user
 input in R. I have used readline() but I wondered is there are sophisticated
 packages that does things like validate answers or generate selection
 lists.

You might consider the gWidgets package. Like rpanel, there are many functions 
that make this kind of thing quite easy to implement.

__
R-help@r-project.org mailing list
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.


Re: [R] user input in R

2009-10-12 Thread Petr PIKAL
And try also search 

statsrus

The first hit shall be Paul Johnsons's howto's which helped me several 
years ago especially with basic issues.

Regards
Petr



r-help-boun...@r-project.org napsal dne 10.10.2009 18:00:19:

  I'm just learning R (I don't know any other programming languages),
and I have a question. I am trying to figure out how to ask for user
input (say, a set of 3 numbers) then put those numbers into an 
array.
I've looked around, but I haven't been able to find any answers that 
I
understand.
Thanks!
 
 Astoundingly, finding out how to load my own datasets was one of the 
hardest 
 things for me to find information on when I was new to R and I had 
 considerable programming experience.  Part of the problem was that I 
didn't 
 yet know exactly what R documentation was available or how to easily 
access 
 it.  Further, veteran users tend to assume loading datasets is easy, and 

 much documentation and sample code uses 'generated data'.  Thus, sample 
code 
 demonstrating 'loading datasets' is a little hard to find when you are 
 starting out!
 
 The official recommendation would go something like, You probably want 
to 
 read the Import/Export documentation.You can find this on Windows 
GUI 
 under help | manuals | Data Import/Export.  Of course you proably also 
need 
 to read chapter 7 of An Introduction to R which is also linked under 
manuals 
 in the help menu.  That said, I offer some beginner cheats you might 
find 
 useful below.  I particularly recommend the Verzzani Appendix.
 
 Things you could type at the command line to learn more about different 
ways 
 to enter data are:
 ?scan
 ?read.table
 ?read.delim
 ?read.csv
 
 Beginner cheats Suggestions
 
 If you want GUI data input (of dataframes), I'd suggest installing and 
 running the Rcmdr package.  It lets you load many types of datasets, 
 including Excel files.  These can be used within Rcmdr or from the 
command 
 line.
 
 If you are really new to R, I suggest looking at some of the contributed 

 documentation to get a feel for how things are done as well as how to 
load 
 user data
 http://cran.us.r-project.org/other-docs.html
 
 In particular, look at the appendix in John Verzzani's document to see a 

 pragmatic description of using scan to input user data.  (see Appendix: 
 Entering Data in R on p. 103 or so).
 http://cran.us.r-project.org/doc/contrib/Verzani-SimpleR.pdf
 
 __
 R-help@r-project.org mailing list
 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@r-project.org mailing list
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.


Re: [R] user input in R

2009-10-10 Thread Robert Baer

I'm just learning R (I don't know any other programming languages),
  and I have a question. I am trying to figure out how to ask for user
  input (say, a set of 3 numbers) then put those numbers into an array.
  I've looked around, but I haven't been able to find any answers that I
  understand.
  Thanks!


Astoundingly, finding out how to load my own datasets was one of the hardest 
things for me to find information on when I was new to R and I had 
considerable programming experience.  Part of the problem was that I didn't 
yet know exactly what R documentation was available or how to easily access 
it.  Further, veteran users tend to assume loading datasets is easy, and 
much documentation and sample code uses 'generated data'.  Thus, sample code 
demonstrating 'loading datasets' is a little hard to find when you are 
starting out!


The official recommendation would go something like, You probably want to 
read the Import/Export documentation.You can find this on Windows GUI 
under help | manuals | Data Import/Export.  Of course you proably also need 
to read chapter 7 of An Introduction to R which is also linked under manuals 
in the help menu.  That said, I offer some beginner cheats you might find 
useful below.  I particularly recommend the Verzzani Appendix.


Things you could type at the command line to learn more about different ways 
to enter data are:

?scan
?read.table
?read.delim
?read.csv

Beginner cheats Suggestions

If you want GUI data input (of dataframes), I'd suggest installing and 
running the Rcmdr package.  It lets you load many types of datasets, 
including Excel files.  These can be used within Rcmdr or from the command 
line.


If you are really new to R, I suggest looking at some of the contributed 
documentation to get a feel for how things are done as well as how to load 
user data

http://cran.us.r-project.org/other-docs.html

In particular, look at the appendix in John Verzzani's document to see a 
pragmatic description of using scan to input user data.  (see Appendix: 
Entering Data in R on p. 103 or so).

http://cran.us.r-project.org/doc/contrib/Verzani-SimpleR.pdf

__
R-help@r-project.org mailing list
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] user input in R

2009-10-09 Thread Sharon Beckett
 I'm just learning R (I don't know any other programming languages),
   and I have a question. I am trying to figure out how to ask for user
   input (say, a set of 3 numbers) then put those numbers into an array.
   I've looked around, but I haven't been able to find any answers that I
   understand.
   Thanks!

__
R-help@r-project.org mailing list
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.


Re: [R] user input in R

2009-10-09 Thread David Winsemius


On Oct 9, 2009, at 6:36 PM, Sharon Beckett wrote:


I'm just learning R (I don't know any other programming languages),
  and I have a question. I am trying to figure out how to ask for user
  input (say, a set of 3 numbers) then put those numbers into an  
array.
  I've looked around, but I haven't been able to find any answers  
that I

  understand.
  Thanks!

I am guessing that your version of looking around did not include  
going to r-search and typing in user input because when you do, you  
quite a bit:


http://search.r-project.org/cgi-bin/namazu.cgi?query=%22user+input%22max=100result=normalsort=scoreidxname=functionsidxname=Rhelp08idxname=views

You could also try this at the console:

??input

Or even

??user input

Althought the last one does not give you very much, it still has a  
link to readline in the first offered hit on my system.


Also possible would be to install package sos and then try:

???user input

... which in this case gives you way too many hits.


--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
R-help@r-project.org mailing list
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.