df_check: Dataframe check

View source: R/df_check.R

df_checkR Documentation

Dataframe check

Description

The df_check() function is included in the package to guide the user if the input data frames do not satisfy the requirements. E.g., the two data frames being analysed must have an equal number of variables, i.e., columns. They must also fulfil the numeric data type requirement. If any of these requirements is not fulfilled, an error message is displayed indicating that a problem exists. This helps the user save time in diagnosing the problem.

Usage

df_check(df1, df2)

Arguments

df1

First dataframe

df2

Second dataframe

Details

The function takes as input two data frames and displays a message of validity of data frames as output.

Value

Returns an error message if the two dataframes do not have the same number of columns or if the elements in both dataframes are not numeric.

Examples

## Not run: df1 <- data.frame(matrix(rnorm(100), ncol = 5))
df2 <- data.frame(matrix(rnorm(100), ncol = 5))
df_check(df1, df2)
## End(Not run)

pgrugwiro/variant documentation built on Aug. 2, 2022, 12:08 p.m.