View source: R/CreateFactorMaps4CA.R
createBaseMap | R Documentation |
createBaseMap
: Create a ggplot2 basemap for CA type graphs.
The final maps are created by using overlays.
A map CA is created with first the baseMap and
then adding a text/dot map.
createBaseMap( data, constraints = NULL, col.axes = "darkorchid", alpha.axes = 0.2, width.axes = 1.1, col.background = adjustcolor("lavender", alpha.f = 0.2), title = NULL )
data |
the factor scores to plot |
constraints |
a list with minx miny maxx maxy
typically obtained from |
col.axes |
color for the axes, default is
|
alpha.axes |
alpha parametere (transparency) for the axes, default is .2. |
width.axes |
the width of the axes, default is 1.1. |
col.background |
the color theme of the background,
default is |
title |
a main title, default is |
a basemap
When creating multiple layers graphs,
because of the way ggplot2
create graphs, all the
the matrices/dataframe should all the have the same column names
[e.g., colnames()
equal to
c("Dimension 1", "Dimension 2")
].
When it is not the case, some strange and cryptic
error may be produced
(e.g., "cannot find Dimension"
).
Hervé Abdi
createFactorMapIJ
## Not run: aBaseMap <- createBaseMap(Fi) # with Fi being a map of factor scores ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.