corsup.fnc {languageR} | R Documentation |
Supplementary rows or columns in correspondence analysis
Description
Corsup calculates supplementary rows or columns for correspondence analysis.
Usage
corsup.fnc(corres, bycol = TRUE, supp, plot = TRUE, font = 3, labels = "",
cex = 1)
Arguments
corres |
A correspondence object. |
bycol |
A logical value indicating whether supplementary columns (the default) or supplementary rows are required. |
supp |
Supplementary rows or columns from a data frame with the
same structure as the data frame used for the |
plot |
A logical value indicating whether supplementary rows or columns should be added to an already existing plot. |
font |
An integer specifying the font to be used for plotting. |
labels |
A character vector with row or column names to be used for plotting. |
cex |
A real specifying the font size required for plotting. |
Value
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.
Author(s)
Extension of the code in Murtagh (2005) by R. Harald Baayen
Radboud University Nijmegen & Max Planck Institute for Psycholinguistics
Nijmegen, The Netherlands
email: baayen@mpi.nl
References
F. Murtagh (2005) Correspondence Analysis and Data Coding with JAVA and R, Chapman & Hall/CRC, Boca Raton, FL.
See Also
Examples
## 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))
## End(Not run)