expect_dimensions_between: Check number of rows and columns matches expectation of range

Description Usage Arguments

View source: R/data_expectations.R

Description

Check number of rows and columns matches expectation of range

Usage

1
2
3
expect_dimensions_between(df, min_nrow = 0, max_nrow = Inf,
  min_cols = 0, max_cols = Inf, stop_if_fail = TRUE,
  return_df = TRUE)

Arguments

df

data frame to check. If a vector is given, it converts it into a one column dataframe to check length as rows

min_nrow

Integer of inclusive minimum OK

max_nrow

Integer of inclusive maximum OK. Default is same as minimum

stop_if_fail

T/F for whether to consider failure an error

return_df

T/F whether to end function with dataframe input (as in if a check in part of a pipe)


dgarmat/expectdata documentation built on Oct. 22, 2019, 5:19 a.m.