Learn R Programming

PriceIndices (version 0.2.3)

data_check: 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)

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.

Arguments

data

Any R object but ultimately it is a data frame.

Examples

Run this code
data_check(milk)
data_check(iris)

Run the code above in your browser using DataLab