build_pibble: Low-level constructor for a pibble object

Description Usage Arguments Details

View source: R/pibble.R


build_pibble() creates a tbl_pb object with more controls. It is useful for creating a tbl_pb internally inside a function.


build_pibble(tbl, .i = NA, .t = NA, .d = 1, .uniqcheck = FALSE)



Quoted variable name(s) that identify the individual cases. If this is omitted, pibble will assume the data set is a single time series.


Quoted variable name indicating the time. pmdplyr accepts two kinds of time variables: numeric variables where a fixed distance .d will take you from one observation to the next, or, if .d=0, any standard variable type with an order. Consider using the time_variable() function to create the necessary variable if your data uses a Date variable for time.


Number indicating the gap in t between one period and the next. For example, if .t indicates a single day but data is collected once a week, you might set .d=7. To ignore gap length and assume that "one period ago" is always the most recent prior observation in the data, set .d=0. By default, .d=1.


Logical parameter. Set to TRUE to perform a check of whether .i and .t uniquely identify observations, and present a message if not. By default this is set to FALSE and the warning message occurs only once per session.


Data frame or tibble to declare as a panel.


Be aware that pibble objects store .i and .t as strings. As a low-level constructor, build_pibble() takes only character arguments for .i and .t, not unquoted variables.

For speed, build_pibble() does not check the adequacy of the inputs.

pmdplyr documentation built on July 2, 2020, 4:08 a.m.