orgsurveyr-data-formats: Data formats used in the orgsurveyr package

Description Examples

Description

The orgsurveyr package works with the following data frame formats:

indiv_df

Data frame with one row per individual in the organisation and variables as multiple columns (wide)

indiv_tall_df

Data frame with multiple rows per individual in the organisation but a fixed number of columns (tall)

org_tall_df

Data frame with multiple rows per unit in the organisation and a fixed number of columns (tall)

The get_df_format and check_df_format functions can be used to determine and check the data frame format.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# examine the tbl_graph object the data relates to
data(tg_org)
tidygraph::as_tbl_graph(tg_org)

# indiv_df example
data(tg_org_indiv_df)
dplyr::tbl_df(tg_org_indiv_df)

# minimal indiv_df example
data(tg_org_indiv_minimal_df)
dplyr::tbl_df(tg_org_indiv_minimal_df)

# indiv_tall_df example
data(tg_org_indiv_tall_df)
dplyr::tbl_df(tg_org_indiv_tall_df)

# org_tall_df example
data(tg_org_summarised_df)
dplyr::tbl_df(tg_org_summarised_df)

ukgovdatascience/orgsurveyr documentation built on May 4, 2019, 7:41 p.m.