Learn R Programming

trundler (version 0.1.19)

products: Find products by name or brand

Description

Find products by name or brand

Usage

products(
  product = NA,
  brand = NA,
  regex = TRUE,
  ignore_case = TRUE,
  barcode = NA,
  head = FALSE,
  ...
)

Arguments

product

Filter by product name (treated as a regular expression).

brand

Filter by product brand (treated as a regular expression).

regex

Should filter be treated as a Regular Expression?

ignore_case

Should case be ignored?

barcode

Filter by barcode.

head

Return the data (FALSE) or the number of records (TRUE)?

...

Arguments passed through to paginate().

Value

Product details as a data.frame if head is FALSE, otherwise the number of products that would be returned.

Examples

Run this code
# NOT RUN {
products(product = "coffee")
products(brand = "Illy")
products(product = "coffee", brand = "Illy")
products(product = "coffee", brand = "Illy", head = TRUE)
# }

Run the code above in your browser using DataLab