scan_gaps: Scan for gaps in panel data

View source: R/balance_panel.R

scan_gapsR Documentation

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)

Arguments

data

A panel_data frame.

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.

See Also

has_gaps(), balance_panel()

Examples

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)


panelr documentation built on Jan. 21, 2026, 9:06 a.m.