get_data_avail.coin: Get data availability of units

View source: R/screen_units.R

get_data_avail.coinR Documentation

Get data availability of units

Description

Returns a list of data frames: the data availability of each unit (row) in a given data set, as well as percentage of zeros. A second data frame gives data availability by aggregation (indicator) groups.

Usage

## S3 method for class 'coin'
get_data_avail(x, dset, out2 = "coin", ...)

Arguments

x

A coin

dset

String indicating name of data set in .$Data.

out2

Either "coin" to output an updated coin or "list" to output a list.

...

arguments passed to or from other methods.

Details

This function ignores any non-numeric columns, and returns a data availability table of numeric columns with non-numeric columns appended at the beginning.

See also vignettes: vignette("analysis") and vignette("imputation").

Value

An updated coin with data availability tables written in .$Analysis[[dset]], or a list of data availability tables.

Examples

# build example coin
coin <-  build_example_coin(up_to = "new_coin", quietly = TRUE)

# get data availability of Raw dset
l_dat <- get_data_avail(coin, dset = "Raw", out2 = "list")
head(l_dat$Summary, 5)


COINr documentation built on Oct. 9, 2023, 5:07 p.m.