closest_matches: Find the closest n variables to your search query

Description Usage Arguments Value See Also Examples

View source: R/closest_matches.R

Description

This function returns a matrix of n rows and length(a) columns with all names of the closest matches of the variables to the user's query, allowing the user to efficiently gather variables for a data query.

Usage

1

Arguments

a

Your query, a character vector

category

If you want to search within a particular category (hdng_names_cats)

n

The amount of variables you want to return.

variable.names

= FALSE. Whether you want to include the description or the abbreviation.

...

Arguments to be passed on to stringdist::stringdistmatrix.

Value

a matrix of n rows and length(a) columns

See Also

hdng::hdng_names_cats

Examples

1
2
closest_matches(c("Verkeer", "Bevolking"), n = 20, variable.names = T)
closest_matches(c("Aaantal vrachtwagens", "Aantal autos", "Schoolgaande kinderen"), n = 30)

basm92/hdng documentation built on July 23, 2020, 12:43 a.m.