assert_nrows {assertable}R Documentation

Assert that a data.frame contains a specified number of rows

Description

Given a data.frame or data.table object and a target number of rows, check that a dataset has that many rows

Usage

assert_nrows(data, target_nrows, quiet = FALSE)

Arguments

data

A data.frame or data.table

target_nrows

Numeric – number of expected rows

quiet

Do you want to suppress the printed message when a test is passed? Default = F.

Value

Throws error if test is violated

Examples

assert_nrows(CO2,84)

[Package assertable version 0.2.8 Index]