add_group {ggplot2}R Documentation

Add group

Description

Ensure that the data frame contains a grouping variable.

Usage

add_group(data)

Arguments

data data.frame

Details

If the group variable is not present, then a new group variable is generated from the interaction of all discrete (factor or character) vectors excluding label.

Value

data.frame with group variable

Author(s)

Hadley Wickham <h.wickham@gmail.com>


[Package ggplot2 version 0.8.2 Index]