``` {r setup, include = FALSE} library(fjolstTranslate)

# Translation Function

Fjolst translate is a simple package with a simple purpose -- to translate the column names of data.frames in the fjolst package put out by the Icelandic MFRI. The data.frames in this package are in Icelandic, and fjolstTranslate gives you the English version.

fjolstTranslate has two functions; `fjolst_translate` and `fjolst_names`. The former function will translate the column names of any data.frame in package fjolst used by Iceland MFRI. The latter will give you both the English and Icelandic translation for any column name in any data.frame from package fjolst.

### To translate a data.frame to English...

use \code{fjolst_translate} as follows

``` {r, echo = TRUE}
all_le <- fjolst_translate(all.le)
all_nu <- fjolst_translate(all.nu)
head(all_le)
head(all_nu)

Note that fjolstTranslate is not setup at this time to translate the metadata data.sets (e.g. any of the ".col" data sets -- such as hopar.col, stodvar.col), or data that are collections of data.frames (e.g. reg.bc). If you wish to see this implemented, please submit a request here.

Checking Names

It is often desirable to double check what an Icelandic word means in English or to check the original Icelandic name in a data.frame. fjolst_names serves that purpose. Type in any combination of character or unquoted names in any of the fjolst data.frames and fjolst_names will return a data.frame showing the Icelandic word and its English translation.

{r, echo = TRUE} fjolst_names(lengd, moskvastaerd, ar) fjolst_names("hyme gla", "micr pou", ammodytes, dypi.kastad)

Happy translating!



pfrater/fjolstTranslate documentation built on May 25, 2019, 2:54 a.m.