kittudg at gmail.com
Sun May 30 18:42:17 CEST 2010
t <- subset(r, (r$time == "0h" & r$strain == "ROC"), select= c(time,strain,
Do ?"&" to understand the difference between & and && .
ANJAN PURKAYASTHA wrote:
> I have a data-frame, r (column names below), that needs subsetting:
> date, time, strain, gene, deltact
> When I try to subset r by applying selection criteria on two columns I get
> an empty data frame. For example I would like to extract all rows that
> time == 0h and strain == ROC.
> So, t <- subset(r, (r$time == "0h" && r$strain == "ROC"), select= c(time,
> strain, gene, deltact)) returns an empty data-frame.
> Is it not possible to subset based on two criteria?
> anjan purkayastha, phd.
> research associate
> fas center for systems biology,
> harvard university
> 52 oxford street
> cambridge ma
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://r.789695.n4.nabble.com/subsetting-tp2236334p2236388.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help