translate_names: translate_names

Description Usage Arguments Value

View source: R/funs_load_edit.R

Description

Translates the names of a data_frame using a specified dictionary. The dictionary can be either a data frame or a path to a .csv file. In either case the dictionary should be made up of two colums the first with the language to translate from and the second with the language to translate into.

Usage

1
translate_names(data, dictionary = "default", reverse = FALSE)

Arguments

data

Data frame object of which the names are to be translated

dictionary

Either a path to a .csv file or a data frame object. If no dictionary is specified a fallback dictionary is used with a warning.

reverse

Setting this to true everses the order of the languages, works only if there is a 1:1 mapping, not recommended.

Value

returns the data_frame, hopefully with translated names.


pfesjostrand/scbwrangler documentation built on May 24, 2019, 1:33 a.m.