Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

makeInsertion

Convert a child class of Insertion into a proper Insertion


Description

The Crunch API expects that Subtotals, Headings, and other insertions all have the same shape. Before sending insertions to the server, we need to call makeInsertion on any insertions to make sure they are proper Insertions. This process sometimes requires a variable's categories object (e.g. in order to convert from category names to category ids)

Usage

## S4 method for signature 'Subtotal'
makeInsertion(x, var_categories)

## S4 method for signature 'Heading'
makeInsertion(x, var_categories)

## S4 method for signature 'Insertion'
makeInsertion(x, var_categories)

## S4 method for signature 'SummaryStat'
makeInsertion(x, var_categories)

Arguments

x

an object the is a child of Insertion (e.g. Subtotal, Heading)

var_categories

categories (from categories(variable)) to used by makeInsertions to make Insertions from a child object (e.g. Subtotal or Heading)

Value

an Insertion object


crunch

Crunch.io Data Tools

v1.28.0
LGPL (>= 3)
Authors
Greg Freedman Ellis [aut, cre], Jonathan Keane [aut], Mike Malecki [aut], Neal Richardson [aut], Gordon Shotwell [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.