Skip to content

Commit

Permalink
Adjusted / added examples for search_omv
Browse files Browse the repository at this point in the history
  • Loading branch information
sjentsch committed Aug 4, 2023
1 parent e6f9230 commit 7a4728d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions R/search_omv.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@
#' # the exact value 24 appears 13 times in age
#' search_omv(bfi_sample, 24, whlTrm = TRUE)
#' # taking the fifth entry from the search results
#' bfi_sample[61, "age"]
#' bfi_sample["61", "age"]
#' # with the following search, both Males and Females are found
#' # (the M of Males, wouldn't be matched if ignCse were FALSE and males is
#' # only a partial match within Females, thus whlTrm must be set to FALSE)
#' search_omv(bfi_sample, "males", whlTrm = FALSE, ignCse = TRUE)
#' # the first entry is a female, the first entry is a male
#' bfi_sample[1, "gender"] # Females
#' bfi_sample[6, "gender"] # Males
#' bfi_sample["1", "gender"] # Females
#' bfi_sample["6", "gender"] # Males
#' # using the search results assigned to a variable
#' srcRes <- search_omv(bfi_sample, "males", whlTrm = FALSE, ignCse = TRUE)
#' bfi_sample[srcRes[[1]][1], names(srcRes[1])] # Females
#' bfi_sample[srcRes[[1]][6], names(srcRes[1])] # Males
#' }
#'
#' @export search_omv
Expand Down

0 comments on commit 7a4728d

Please sign in to comment.