getenum_df: Generate a data.frame of counts from one or two enumerations.

Description Usage Arguments Value Examples

View source: R/verisr2.R

Description

Generate counts from the values given one or two enumerations and return both the count and proportion. Replicates in dplyr the original getenum function from verisr which referenced deprecated code from data.table.

Usage

1
getenum_df(data, params)

Arguments

data

A data frame object, typically converted from the VCDB JSON format

params

Character or vector of characters representing one or more fields of interest (enumeration)

Value

a data frame with count and frequency from enumerating on one or more fields.

Examples

1
2
getenum_df(vcdb, "asset.variety")
getenum_df(vcdb, c("action", "asset.variety"))

onlyphantom/verisr2 documentation built on May 20, 2019, 12:19 p.m.