Map path along an ordered variable

Share:

Description

Plot a path along an ordered variable. If the variable is numerical it is cut into groups by the min_cut function.

Usage

1
2
map.path(object, x, map = map.ind(object, dim), dim = c(1, 2),
  label = TRUE, min.size = length(x)/10, ...)

Arguments

object

is a soc.ca result object

x

is an ordered vector, either numerical or factor

map

is a plot object created with one of the mapping functions in the soc.ca package

dim

the dimensions in the order they are to be plotted. The first number defines the horizontal axis and the second number defines the vertical axis.

label

if TRUE the label of the points are shown

min.size

is the minimum size given to the groups of a numerical variable, see min_cut.

...

further arguments are passed onto geom_path, geom_point and geom_text from the ggplot2 package

Examples

1
2
3
4
example(soc.ca)
map <- map.ind(result, point.color = as.numeric(sup$Age))
map <- map + scale_color_continuous(high = "red", low = "yellow")
map.path(result, sup$Age, map)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.