Learn R Programming

panelr (version 1.0.0)

scan_gaps: Scan for gaps in panel data

Description

This function identifies which entity-wave combinations are missing in a panel_data() object.

Usage

scan_gaps(data)

Value

A tibble with columns for the id variable and wave variable, showing which combinations are missing. If there are no gaps, returns a tibble with zero rows.

Arguments

data

A panel_data frame.

See Also

has_gaps(), balance_panel()

Examples

Run this code
data("WageData")
wages <- panel_data(WageData, id = id, wave = t)

# Create data with gaps
wages_gaps <- wages[!(wages$t == 3 & wages$id == wages$id[1]), ]
scan_gaps(wages_gaps)

Run the code above in your browser using DataLab