panel_data: Create panel data frames

Description Usage Arguments Value Examples

View source: R/panel_data.R

Description

Format your data for use with panelr.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
panel_data(data, id = id, wave = wave, ...)

as_pdata.frame(data)

as_panel_data(data, ...)

## Default S3 method:
as_panel_data(data, id = id, wave = wave, ...)

## S3 method for class 'pdata.frame'
as_panel_data(data, ...)

as_panel(data, ...)

Arguments

data

A data frame.

id

The name of the column (unquoted) that identifies participants/entities. A new column will be created called id, overwriting any column that already has that name.

wave

The name of the column (unquoted) that identifies waves or periods. A new column will be created called wave, overwriting any column that already has that name.

...

Attributes for adding onto this method. See tibble::new_tibble() for a run-through of the logic.

Value

A panel_data object.

Examples

1
2
data("WageData")
wages <- panel_data(WageData, id = id, wave = t)

panelr documentation built on July 13, 2019, 1:07 a.m.