Hi:
You might also want to consider the use of subset, as in
subset(foo, name == "A")or
subset(foo, name %in% c("A", "B"))
HTH,
Dennis
On Thu, Feb 18, 2010 at 8:01 AM, stephen sefick wrote:
> Is there any easy way to pull out the row indexes for a logical
> matching statment?
>
>
If I understand your question, you can try this:
which(foo$name %in% c("A", "B"))
On Thu, Feb 18, 2010 at 2:01 PM, stephen sefick wrote:
> Is there any easy way to pull out the row indexes for a logical
> matching statment?
>
> #example code###
Hi Stephen,
See below.
On Thursday 18 February 2010 11:01:25 am stephen sefick wrote:
> Is there any easy way to pull out the row indexes for a logical
> matching statment?
>
> #example
code#
> foo <- data.frame(name=c(rep("A", 25), rep("B"
Is there any easy way to pull out the row indexes for a logical
matching statment?
#example code#
foo <- data.frame(name=c(rep("A", 25), rep("B", 25), rep("C", 25),
rep("A", 25)), stuff=rnorm(100), and=rnorm(100), things=rnorm(100))
#this is
4 matches
Mail list logo