I'm sorry for what I'm sure is a terribly simple question.  I have a large
dataframe along these lines:

S<- 1:3
d<- data.frame(cbind(S=rep(paste('S',S,sep=""),each=30),
trial=rep(1:3,each=10),
    FactorA=rep(paste('L',1,sep=""),each=30), Acc=
c(rep(1,each=20),rep(0,each=10)),
    Sample=rep(1:10,3), DV= sample(runif(10),10)))

but where each trial has hundreds of samples and where there are several
hundred trials per subject.

I need to comb through the data and find, for example, how many trials are
correct (Acc==1).  I can figure it out with loops (as I did with the program
I used to use), but I was hoping for a much faster/cleaner way to select out
these trials -- the real data frame has several million rows.

thanks in advance

Matthew

	[[alternative HTML version deleted]]

