Re: [R] extract with condition

From: Stephen D. Weigand <weigand.stephen_at_charter.net>
Date: Thu 19 May 2005 - 13:35:07 EST

On May 18, 2005, at 5:11 AM, Jonathan Charrier wrote:

> hello everybody,
> i want to extract the name of the rows for the value = "TRUE"
> these names give for the next program a list of file
> i try many functions, and indexation but no solution give to me, i
> transform only the matrix.
> thanks a lot
> Jonathan Charrier
>
> nmodT <- Y.obs1
> Q <- 3
> T <- length(nmodT[,1])*Q
>
> qsd <- colSums(nmodT)
> qsd <- as.matrix(qsd)
>
> aqw<- qsd>T
>
> aqw
>
> [,1]
> 2003-01-01 FALSE
> 2003-01-11 TRUE
...

> 2003-12-21 TRUE
Jonathan,

If you next do row.names(aqw)[aqw[,1]] does that get you what you want?

Hope this helps,

Stephen



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 19 13:40:45 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:50 EST