R/hsortplot.R

Defines functions hsortplot

Documented in hsortplot

hsortplot=function(don,group,numr=2,numc=2){
nb.juge=length(group)
gp=0
for(i in 1:nb.juge){
distance=group[i]-tab.disjonctif(don[,(gp+1):(gp+group[i])])%*%t(tab.disjonctif(don[,(gp+1):(gp+group[i])]))
cah=cluster::agnes(distance,method="single",diss=TRUE)
if (((i-1)%%(numc*numr))==0){
if (!nzchar(Sys.getenv("RSTUDIO_USER_IDENTITY"))) dev.new()
par(mfrow = c(numr, numc))
}
plot(cah,main=paste("H-Sorting of subject",i,sep=" "),xlab="",sub="",which.plots=2)
gp=gp+group[i]
}}

Try the SensoMineR package in your browser

Any scripts or data that you put into this service are public.

SensoMineR documentation built on July 2, 2020, 1:56 a.m.