Learn R Programming

rsdv (version 0.2.0)

check_constraint: Check a single constraint against each row of a data frame

Description

Check a single constraint against each row of a data frame

Usage

check_constraint(data, constraint)

Value

Logical vector of length nrow(data).

Arguments

data

A data frame.

constraint

An rsdv_constraint object.

Examples

Run this code
df <- data.frame(a = c(1, 2, 3), b = c(1, 2, 9))
check_constraint(df, equality_constraint("a", "b"))

Run the code above in your browser using DataLab