Re: [R] sequential input script dataframe process functionality

2014-09-11 Thread rl
On 2014-09-10 10:45, PIKAL Petr wrote: On 2014-09-08 15:47, William Dunlap wrote: > d <- data.frame(Choices=c("One","Two","One","Three"), X=1:4) > i <- 1 # possible output of menu(unique(d$Choices)) > d[ d$Choices[i] == d$Choices, ] > # Choices X > #1 One 1 > #3 One 3 > > testd <- data

Re: [R] sequential input script dataframe process functionality

2014-09-10 Thread PIKAL Petr
; From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of r...@openmailbox.org > Sent: Tuesday, September 09, 2014 12:53 PM > To: William Dunlap > Cc: r-help@r-project.org > Subject: Re: [R] sequential input script dataframe process > functiona

Re: [R] sequential input script dataframe process functionality

2014-09-09 Thread rl
On 2014-09-08 15:47, William Dunlap wrote: d <- data.frame(Choices=c("One","Two","One","Three"), X=1:4) i <- 1 # possible output of menu(unique(d$Choices)) d[ d$Choices[i] == d$Choices, ] # Choices X #1 One 1 #3 One 3 testd <- data.frame(Choices=c("One","Two","One","Three"), X=1:4) t

Re: [R] sequential input script dataframe process functionality

2014-09-08 Thread William Dunlap
d <- data.frame(Choices=c("One","Two","One","Three"), X=1:4) i <- 1 # possible output of menu(unique(d$Choices)) d[ d$Choices[i] == d$Choices, ] # Choices X #1 One 1 #3 One 3 I believe this sort of thing is covered in the Introduction to R pdf that comes with R. It is worth reading. Bil

Re: [R] sequential input script dataframe process functionality

2014-09-08 Thread rl
On Mon, 8 Sep 2014 07:55:23 -0700 William Dunlap wrote: Again, feed the output of menu() directly into "[". Do not use switch(). Bill Dunlap The function was changed to: testdataextract1<-function (testdata) { selectionresult<-menu(c(unique(levels(testdata[,1]))),graphics=FALSE,title='Selec

Re: [R] sequential input script dataframe process functionality

2014-09-08 Thread William Dunlap
Again, feed the output of menu() directly into "[". Do not use switch(). Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Sep 8, 2014 at 2:12 AM, wrote: > On Sat, 6 Sep 2014 08:21:19 -0700 > William Dunlap wrote: > >> > >> > testdataextract1<-switch(menu(c(unique(levels(testdata[,1]))),gr

Re: [R] sequential input script dataframe process functionality

2014-09-08 Thread rl
On Sat, 6 Sep 2014 08:21:19 -0700 William Dunlap wrote: > testdataextract1<-switch(menu(c(unique(levels(testdata[,1]))),graphics=FALSE,title='Select > something')) The switch function does not work the way you are expecting it to. Read help("switch") and read the introduction to R that comes

Re: [R] sequential input script dataframe process functionality

2014-09-06 Thread William Dunlap
> testdataextract1<-switch(menu(c(unique(levels(testdata[,1]))),graphics=FALSE,title='Select > something')) The switch function does not work the way you are expecting it to. Read help("switch") and read the introduction to R that comes with R. You probably want to use the output of menu() to ex

Re: [R] sequential input script dataframe process functionality

2014-09-06 Thread rl
On 2014-09-05 09:40, r...@openmailbox.org wrote: Subscribers, Could someone please indicate correct terminology and relevant manual sections to achieve the following conceptual workflow, to create a script to select sequentially parts of a dataframe: "Welcome to this R script program" Select l

[R] sequential input script dataframe process functionality

2014-09-05 Thread rl
Subscribers, Could someone please indicate correct terminology and relevant manual sections to achieve the following conceptual workflow, to create a script to select sequentially parts of a dataframe: "Welcome to this R script program" Select level number below of variable 'X' [1] [2] [3]