Learn R Programming

pixiedust (version 0.9.4)

get_dust_part: Get a Portion of the Table Stored in a dust Object

Description

Making customized table headers and footers requires a data frame be added to the dust object that has the same column dimension as the rest of the table. In order to reduce the inconvenience of counting columns, get_dust_part extracts the data frame portion currently in use. This ensures the column dimension is correct with the current values, and provides an object suitable for editing.

Usage

get_dust_part(x, part = c("head", "foot", "interfoot", "body"))

Value

an object of class data.frame

Arguments

x

An object of class dust

part

character(1), naming the part of the table to retrieve. May be one of "head", "foot", "interfoot", or "body".

Functional Requirements

  1. Return, as a data frame, the part of the table requested in part

  2. Cast an error if x is not a dust object.

  3. Cast an error if part is not one of c("head", "foot", "interfoot", "body")