data_check: Checking the user's data frame

data_checkR Documentation

Checking the user's data frame

Description

The function checks if the argument data points to a data frame which is suitable for further price index calculation. In particular, the function checks whether the indicated data frame contains the required columns and whether they are of the appropriate type (if not, the function returns FALSE and an appropriate comment).

Usage

data_check(data)

Arguments

data

Any R object but ultimately it is a data frame.

Value

The function returns TRUE if the data frame indicated by the data parameter is suitable for the calculation of price indices and returns FALSE otherwise.

Examples

data_check(milk)
data_check(iris)

PriceIndices documentation built on July 9, 2023, 6:20 p.m.