print.MBPCAOS | R Documentation |
Print results of PCAOS method
## S3 method for class 'MBPCAOS'
print(x, file = NULL, sep = ";", ...)
x |
an object of class PCAOS |
file |
A connection, or a character string naming the file to print to. If NULL (the default), the results are not printed in a file |
sep |
character string to insert between the objects to print |
... |
further arguments passed to or from other methods |
data('antibiotic')
antb.uses <- antibiotic[,c('Atb.conso','Atb.Sys')]
health <- antibiotic[,c('Age','Loss')]
vet.practices <- antibiotic[,c(6:15)]
antibiotic <- data.frame(antb.uses,health,vet.practices)
# Defining blocks
blocks.name = c("antibiotic.uses","Health.of.turkeys","Veterinary.practices")
blocks <- c(2,2,10)
# Level of scaling
level.scale <- rep(NA,ncol(antibiotic))
res.nature <- nature.variables(antibiotic)
level.scale [res.nature$p.numeric] <- "num"
level.scale [res.nature$p.quali] <- "nom"
#Warning; the ordinal nature of variables can not be detected automaticaly.
level.scale[c(1,14)] <- "ord"
# MBPCAOS
res.MBPCAOS <- MBPCAOS(data = antibiotic,
level.scale = level.scale,
blocks = blocks,
blocks.name = blocks.name,
nb.comp = 3)
print(res.MBPCAOS)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.