translate_faunabr: Translate information in Brazilian Fauna database

View source: R/translate_faunabr.R

translate_faunabrR Documentation

Translate information in Brazilian Fauna database

Description

This function translates information in the "lifeForm", "origin", "habitat", "taxonRank", and "taxonomicStatus" columns between Portuguese and English.

Usage

translate_faunabr(data, map_list = NULL, to = "en")

Arguments

data

(data.frame) the data.frame imported with the load_faunabr function.

map_list

(list) A list of data.frames used for translation. The default is NULL, which means it uses faunabr::map_translation. If not NULL, its structure (list names and data.frame column names) must be identical to faunabr::map_translation.

to

(character) The target language for translation. Available options are "en" to translate from Portuguese to English, and "pt_br" to translate from English to Portuguese. The default is "en".

Value

A data.frame with the values in the "lifeForm", "origin", "habitat", "taxonRank", and "taxonomicStatus" columns translated.

Examples

data("fauna_data") #Load data example (in English)
#Translate to Portuguese
fauna_portugues <- translate_faunabr(data = fauna_data, to = "pt_br")
# See attributes of lifeForm in Portuguese
fauna_attributes(fauna_portugues, attribute = "lifeForm")


faunabr documentation built on Nov. 5, 2025, 7:26 p.m.