DT = data.frame(Block=c( rep(1,64), rep(2,64) ),
Par1=c( sort(rep(1:8,8)), sort(rep(1:8,8)) ),
Par2=rep(1:8, 16),
Ftime=rnorm(128)
)
DT2 <- add.diallel.vars(DT,par1="Par1", par2="Par2")
head(DT2)
Run the code above in your browser using DataLab