permutangle | R Documentation |
Create palettes from an image
permutangle( mat, var, group1, group2, scale = FALSE, iter = 100, cex1 = range01(var[group1] + 1), cex2 = range01(var[group2] + 1), cex3 = 0.7, cex4 = 1.2, labels = c("stgr1", "stgr2", "endgr1", "endgr2"), pch1 = 19, pch2 = 19, pch3 = 19, col1 = "red", col2 = "blue" )
mat |
array: rgb array |
var |
numeric: desidered resize factor |
group1 |
logical: if TRUE each color is counted once |
group2 |
logical: if TRUE (color) variables are scaled |
scale |
numeric: desidered number of clusters (i.e., number of palettes) |
iter |
numeric: length of the color vector of each palette |
cex1 |
numeric: desidered PLS axis |
cex2 |
numeric: size of colored squares |
cex3 |
numeric: size of color names |
cex4 |
numeric: size of color names |
labels |
numeric: size of color names |
pch1 |
numeric: size of color names |
pch2 |
numeric: size of color names |
pch3 |
numeric: size of color names |
col1 |
numeric: size of color names |
col2 |
numeric: size of color names |
angle list: color palettes arranged in a list
permangles list: color palettes arranged in a list
angle list: color palettes arranged in a list
iterangles list: color palettes arranged in a list
p-value list: color palettes arranged in a list
PCA_angle list: color palettes arranged in a list
PCA_interangles list: color palettes arranged in a list
PCA_p-value list: color palettes arranged in a list
Antonio Profico
## Not run: require(shapes) require(Morpho) data("gorf.dat") data("gorm.dat") Array<-bindArr(gorf.dat,gorm.dat,along=3) CS<-apply(Array,3,cSize) Sex<-c(rep("F",dim(gorf.dat)[3]),rep("M",dim(gorm.dat)[3])) #Shape and size space AllTrajFB<-permutangle(procSym(Array,scale=FALSE,CSinit = FALSE)$PCscores, var=CS,group1=which(Sex=="F"),group2=which(Sex=="M"),scale=FALSE,iter=50) hist(AllTrajFB$iterangles,breaks = 100,xlim=c(0,90)) abline(v=AllTrajFB$angle,lwd=2,col="red") hist(AllTrajFB$PCA_iterangles,breaks = 100,xlim=c(0,90)) abline(v=AllTrajFB$PCA_angle,lwd=2,col="red") #Shape space AllTrajFB<-permutangle(procSym(Array)$PCscores, var=CS,group1=which(Sex=="F"),group2=which(Sex=="M"),scale=FALSE,iter=50) hist(AllTrajFB$iterangles,breaks = 100,xlim=c(0,90)) abline(v=AllTrajFB$angle,lwd=2,col="red") hist(AllTrajFB$PCA_iterangles,breaks = 100,xlim=c(0,90)) abline(v=AllTrajFB$PCA_angle,lwd=2,col="red") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.