dftab: Convert a data frame into a matrix suitable for barplot input

Description Usage Arguments Value Note

View source: R/util.r

Description

Convert a data frame into a matrix suitable for barplot input

Usage

1
dftab(x)

Arguments

x

a data frame with at least one numeric and one factor column and no more than three columns

Value

a matrix suitable for use with barplot or nvbarplot

Note

The data frame must contain at least one factor and one numeric variable, and a total of at most three variables. In the case of two factor variables, the first one defines the x-axis barplot groups and the 2nd one the within-bar groups.


bwlewis/nvd3 documentation built on July 13, 2021, 9:02 p.m.