Overview

pmdplyr

pmdplyr package

Setting panel structure

as_pibble()

Coerce to a pibble panel data set object

is_pibble()

Check whether an object has been declared as panel data

pibble()

Create a pibble panel data set object

panel_convert()

Convert between panel data types

ID and time variables

id_variable()

Create a single panel ID variable out of several

time_variable()

Create a single integer time period index variable

Filling in data

panel_fill()

Fill in gaps in panel data

panel_locf()

Fill in missing (or other) values of a panel data set using known data

Panel consistency

fixed_check()

Check for inconsistency in variables that should be fixed

fixed_force()

Enforce consistency in variables

Two-table verbs

inexact_inner_join() inexact_left_join() inexact_right_join() inexact_full_join() inexact_semi_join() inexact_nest_join() inexact_anti_join()

Join two data frames inexactly

safe_join()

Join two data frames safely

left_join(<tbl_pb>) inner_join(<tbl_pb>) right_join(<tbl_pb>) full_join(<tbl_pb>) semi_join(<tbl_pb>) nest_join(<tbl_pb>) anti_join(<tbl_pb>)

Join two pibbles together

intersect(<tbl_pb>) union(<tbl_pb>) union_all(<tbl_pb>) setdiff(<tbl_pb>)

Set operations

Mutate variations

mutate_cascade()

Perform mutate one time period at a time ('Cascading mutate')

mutate_subset()

Propagate a calculation performed on a subset of data to the rest of the data

Time lag

tlag()

Time-lag a variable

Additional calculations

within_i() between_i()

Perform standard panel-data calculations

mode_order()

Calculate the mode, and use original order to break ties

Datasets

Scorecard

Earnings and Loan Repayment in US Four-Year Colleges

SPrail

2,000 Spanish train trips

pibble methods for dplyr verbs

mutate(<tbl_pb>) distinct(<tbl_pb>) group_by(<tbl_pb>) ungroup(<tbl_pb>) select(<tbl_pb>) rename(<tbl_pb>) summarize(<tbl_pb>) summarise(<tbl_pb>) transmute(<tbl_pb>)

pibble methods