Learn R Programming

insight (version 0.15.0)

data_match: Find row indices of a data frame matching a specific condition

Description

Find row indices of a data frame that match a specific condition.

Usage

data_match(x, to, ...)

Arguments

x

A data frame.

to

A data frame matching the specified conditions.

...

Other arguments passed to or from other functions.

Value

A dataframe containing rows that match the specified configuration.

Examples

Run this code
# NOT RUN {
matching_rows <- data_match(mtcars, data.frame(vs = 0, am = 1))
mtcars[matching_rows, ]

matching_rows <- data_match(mtcars, data.frame(vs = 0, am = c(0, 1)))
mtcars[matching_rows, ]
# }

Run the code above in your browser using DataLab