It's a pretty inefficient way to do things (e.g. 5+ iterations [20
seconds] to find a good sample) but if you're not doing this often I
guess you could do something like:
checkNeighborEqual<-function(x){
#assuming the final value is not infinity
return(any(x==c(x[-1],Inf)))
}
#fake data
x<-
Hi,
I'm trying to randomize a sequence of trials for an experimental
design. The trials consist of values for each of two factors. As is
there are 30 combinations of the two factors, and I want them to be
ordered randomly but with the requirement that for one of the factors,
the value can n
2 matches
Mail list logo