# NOT RUN {
# Minimal example; compute Rao's index
# }
# NOT RUN {
a <- matrix(c(10,10,10,20,20,20,20,30,30),ncol=3,nrow=3)
out <- Rao(x=a,window=3,dist_m="euclidean",na.tolerance=1.0,shannon=FALSE,mode="classic")
# Compute both Rao and Shannon index
out <- Rao(x=a,window=3,dist_m="euclidean",na.tolerance=1.0,shannon=TRUE,mode="classic")
# Compute both Rao and Shannon index multiple windows
out <- Rao(x=a,window=c(3,5),dist_m="euclidean",na.tolerance=1.0,shannon=TRUE,mode="classic")
# Compute multidimension Rao's index rescaling the input matrices
a <- matrix(c(10,10,10,20,20,20,20,30,30),ncol=3,nrow=3)
b <- matrix(c(0.5,0.5,0.1,0.1,0.3,0.3,0.3,0.3,0.3),ncol=3,nrow=3)
out <- Rao(x=list(a,b),window=3,dist_m="euclidean",na.tolerance=1.0,
mode="multidimension",rescale=TRUE,debugging=TRUE)
# }
Run the code above in your browser using DataLab