ghquery: ghquery

View source: R/ghquery.R

ghqueryR Documentation

ghquery

Description

Queries the unique (short) names for each file in the repository. Several query methods are available, see Details.

Usage

ghquery(
  query,
  n = 6,
  full.names = FALSE,
  method = c("fpdist", "overlap", "tfidf"),
  costs = NULL,
  counts = FALSE,
  useBytes = FALSE
)

Arguments

query

character: query string

n

integer: maximal number of matches to return

full.names

logical: should full names used instead of short names (default: FALSE)

method

character: method to be used (default: fpdist)

costs

a numeric vector or list with names partially matching ‘⁠insertions⁠’, ‘⁠deletions⁠’ and ‘⁠substitutions⁠’ giving the respective costs for computing the Levenshtein distance, or NULL (default) indicating using unit cost for all three possible transformations.

counts

a logical indicating whether to optionally return the transformation counts (numbers of insertions, deletions and substitutions) as the "counts" attribute of the return value.

useBytes

a logical. If TRUE distance computations are done byte-by-byte rather than character-by-character.

Details

The following query methods are available:

  • fpdist uses a partial backward matching distance based on utils::adist()

  • overlap uses the overlap distance for query and file names

Value

character vector of short names fitting best to the query

Examples

if (interactive()) ghquery("bank")

mmstat4 documentation built on May 29, 2024, 11:15 a.m.