% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unsupervised-market-basket.R
\name{filter_rules_by_item}
\alias{filter_rules_by_item}
\title{Filter Rules by Item}
\usage{
filter_rules_by_item(rules_obj, item, where = "both")
}
\arguments{
\item{rules_obj}{A tidy_apriori object or tibble of rules}

\item{item}{Character; item to filter by}

\item{where}{Character; "lhs", "rhs", or "both" (default: "both")}
}
\value{
A tibble of rules containing the specified \code{item} in the
requested position.
}
\description{
Subset rules containing specific items
}
\examples{
\donttest{
if (requireNamespace("arules", quietly = TRUE)) {
  data("Groceries", package = "arules")
  res <- tidy_apriori(Groceries, support = 0.001, confidence = 0.5)
  filter_rules_by_item(res, "whole milk", where = "rhs")
}
}

}
