Learn R Programming

insight (version 0.14.1)

data_match: Find rows of a data frame that are matching a specific subset

Description

Find row indices of a data frame that are matching a specific configuration.

Usage

data_match(x, to)

Arguments

x

A data frame.

to

The data frame of which to meet the characteristics.

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