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
; 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
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
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
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
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
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
> 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
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
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]
10 matches
Mail list logo