Displaying 1 result from an estimated 1 matches for "binlag".
Did you mean:
bilag
2000 Jul 28
2
Loop removal?
Dear all,
I've got a quite large dataframe (stor) with rows subject and rt (reaction
time). I would like to split the reaction times per subject into 6 bins of
equal size. Right now, I'm using the following code:
bindata <- function(rt) {
bindata <- rep(-1,length(rt))
binwidth <- length(rt)/6
bindata[order(rt)[(0*binwidth)+1:(1*binwidth)]] <- 1