# NOT RUN {
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
# }
# NOT RUN {
require(car)
multivari("cycles", "len", "load", "amp", data=Wool,
col=list("black","red",c("grey70","grey45","grey20")),
pch=list(15,17,8), legend=TRUE, xlab.depth = 2, lwd=2)
multivari("cycles", "load", "len", "amp", data=Wool,
col=list("black",c("red","blue","darkgreen"),
c("grey70","grey45","grey20")),
pch=list(15,17,8), legend=TRUE, xlab.depth = 2, lwd=2)
## create a fake fourth factor
fakedat <- rbind(cbind(newfac="blabla",Wool),cbind(newfac="albalb",Wool))
## make it character for demonstrating the effect of sort option
fakedat$newfac <- as.character(fakedat$newfac)
## default: sort order in the data is respected (order of unique is used)
multivari("cycles", "load", "len", "amp", "newfac", data=fakedat,
col=list("black",c("red","blue","darkgreen"),
c("grey70","grey45","grey20")),
pch=list(15,17,8), legend=TRUE, xlab.depth = 2, lwd=2, cex=0.8)
## sort=TRUE: levels are sorted (order of sort(unique))
multivari("cycles", "load", "len", "amp", "newfac", data=fakedat,
col=list("black",c("red","blue","darkgreen"),
c("grey70","grey45","grey20")),
pch=list(15,17,8), legend=TRUE, xlab.depth = 2, lwd=2, cex=0.8,
sort=TRUE)
# }
Run the code above in your browser using DataLab