data('votB')
K = 2
ex1 <- lba(parties ~ city,
data=votB,
K = 2)
plotcorr(ex1)
#It's very simple. with colors!
plotcorr(ex1,
col.points = 3:5,
col.budget = c(5,3))
#Changing radius!
plotcorr(ex1,
radius = rep(0.7,2))
#Without metrics!
plotcorr(ex1,
metrics = FALSE)
#Change legend options!
plotcorr(ex1,
args.legend = list(ncol=3))
#Change height points!
plotcorr(ex1,
height.points = rep(-0.1,6))
if (FALSE) {
#K = 3
K = 3
ex2 <- lba(parties ~ city,
data=votB,
K = 3)
plotcorr(ex2)
#Change budget options
plotcorr(ex2,
pch.budget = 5,
col.budget = 2,
labels.budget = c('lba1','lba2','lba3'))
#Change points options
plotcorr(ex2,
pch.points = 20,
col.points = 4,
labels.points = rownames(ex2$Aoi),
args.legend = list(plot=FALSE))
#Coloring the groups
plotcorr(ex2,
col.points = c(1,2,2,3,3,2),
col.budget = c(3,1,2),
args.legend = list(ncol=3))
#K = 4
K = 4
data(postmater)
new_post <- as.matrix(postmater[,-1])
row.names(new_post) <- postmater[,1]
ex3 <- lba(new_post,
K = K)
plotcorr(ex3)
#A bit didatic!
plotcorr(ex3,
args.legend = list(x = -2.5,
y = 5.5,
xpd=TRUE,
ncol=5))
#Dynamic? Yes, you can!
plotcorr(ex3,
rgl.use = TRUE)
}
Run the code above in your browser using DataLab