Learn R Programming

soc.ca (version 0.8.1)

add.cases: Add a layer of cases (individuals) to an mca map

Description

Add a layer of cases (individuals) to an mca map

Usage

add.cases(
  object,
  dim = c(1, 2),
  ind = extract_ind(object, dim),
  mapping = aes(),
  ...
)

add.ind( object, dim = c(1, 2), ind = extract_ind(object, dim), mapping = aes(), ... )

Value

a ggplot2 object that can be added to an existing plot like those produced by map.ca.base

Arguments

object

a soc.mca result object

dim

a numeric vector with the plotted dimensions

ind

a data.frame with coordinates of cases as produced by extract_ind. This controls the plotted points.

mapping

a call to aes from the ggplot2 package. Here you can map aesthetics to variables such as color, fill, alpha, size and shape.

...

further arguments are passed on to geom_point

Examples

Run this code
example(soc.mca)
map.ca.base() + add.cases(result)

Run the code above in your browser using DataLab