tofrench: Translate variables to french

View source: R/translation_to_french.R

tofrenchR Documentation

Translate variables to french

Description

Function for translating a fixed set of variables to french

Usage

tofrench(
  dataset,
  which = c("sens_how", "treatment_info", "resist", "benefits", "symptoms", "prevent",
    "recognise", "reason_no", "where_swallow", "decision", "how_taken", "vil_mda_type",
    "vil_community_how", "yesno", "gender", "school"),
  var
)

Arguments

dataset

A dataframe containing variable to be translated

which

Specifies which set of translations to match. Individual questionnaire: *sens_how for how they heard about MDA, *treatment_info for what treatment info received, *resist,benefits,symptoms,prevent for what negative rumours/benefits/symptoms/prevention they were aware of *recognise for recognition of drugs and terms, *reason_no for reason not swallowed, *where_swallow for where swallowed, *decision for who decided, *how_taken for how were drugs swallowed, *yesno for binary yes/no questions, *gender for male/female questions, *school for education level and school type questions. Village questionnaire: *vil_mda_type for mda delivery platform, *vil_community_how for community-wide delivery platform.

var

The variable from dataframe to be translated

Value

An object of the same type as dataset, with additional column created named var_fr of the french translations.

Examples

dataset %>% tofrench("yesno",ind_child_attendance)
will return `dataset` object with a new column named ind_child_attendance_fr, with values `Oui` and `Non`.

SCIFoundation/sciCoverageR documentation built on Oct. 31, 2024, 11:45 p.m.