Tools for experiments-生成拉丁方(counterbalanced orders)
问题你想要生成平衡序列用于实验。方案函数latinsquare()(在下方定义)可以被用来生成拉丁方。latinsquare(4)#>[,1][,2][,3][,4]#>[1,]1243#>[2,]2134#>[3,]3412#>[4,]4321#Togenerate2Latinsquaresofsize4(insequence)latinsquare(4,reps=2)#>[,1][,2][,3