Last chance! 50% off unlimited learning
Sale ends in
Corsup calculates supplementary rows or columns for correspondence analysis.
corsup.fnc(corres, bycol = TRUE, supp, plot = TRUE, font = 3, labels = "",
cex = 1)
A correspondence object.
A logical value indicating whether supplementary columns (the default) or supplementary rows are required.
Supplementary rows or columns from a data frame with the
same structure as the data frame used for the corres
object.
A logical value indicating whether supplementary rows or columns should be added to an already existing plot.
An integer specifying the font to be used for plotting.
A character vector with row or column names to be used for plotting.
A real specifying the font size required for plotting.
If plot = FALSE
, a matrix with the supplementary coordinates.
Otherwise, supplementary rows or columns are added to an already
existing plot of a correspondence object.
F. Murtagh (2005) Correspondence Analysis and Data Coding with JAVA and R, Chapman & Hall/CRC, Boca Raton, FL.
# NOT RUN {
# }
# NOT RUN {
data(oldFrench)
data(oldFrenchMeta)
prose = oldFrench[oldFrenchMeta$Genre=="prose" &
!is.na(oldFrenchMeta$Year),]
proseinfo = oldFrenchMeta[oldFrenchMeta$Genre=="prose" &
!is.na(oldFrenchMeta$Year),]
proseinfo$Period = as.factor(proseinfo$Year <= 1250)
prose.ca = corres.fnc(prose)
plot(prose.ca, addcol = FALSE,
rcol = as.numeric(proseinfo$Period) + 1,
rlabels = proseinfo$Year, rcex = 0.7)
proseSup = oldFrench[oldFrenchMeta$Genre == "prose" &
is.na(oldFrenchMeta$Year),]
corsup.fnc(prose.ca, bycol = FALSE, supp = proseSup, font = 2,
cex = 0.8, labels = substr(rownames(proseSup), 1, 4))
# }
Run the code above in your browser using DataLab