#create a toy LHD with 5 rows and 3 columns
toy=rLHD(n=5,k=3);toy
toy2=toy-1;toy2 #make elements of "toy" become 0,1,2,3,4
#Implementing Williams transformation on both toy and toy2:
#The result shows that "WT" function is able to detect the
#elements of input matrix and make adjustments.
WT(toy)
WT(toy2)
#Change the baseline
WT(toy,baseline=5)
WT(toy,baseline=10)
Run the code above in your browser using DataLab