forked from edgararuiz-zz/datalang
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
60 lines (38 loc) · 1.57 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: datalang
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
[![Travis build status](https://travis-ci.org/edgararuiz/datalang.svg?branch=master)](https://travis-ci.org/edgararuiz/datalang)
[![Coverage status](https://codecov.io/gh/edgararuiz/datalang/branch/master/graph/badge.svg)](https://codecov.io/github/edgararuiz/datalang?branch=master)
# datalang
The goal is to help people whose first, or preferred, language is not English. This package aims to aid in translating data in packages, and help files. This should lower the barrier of learning R, and data analysis in general.
Even though this package can translate data on the fly, the primary way it should be used is within another R package.
## How it works
The `datalang` package uses a translation spec file in order to perform the translation. The expected spec file format is YAML. `datalang` uses the YAML file to know which column names, and data values, to change. The same YAML spec file can contain the information needed to produce a help file.
## Installation
The development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("edgararuiz/datalang")
```
## Example
```{r}
my_spec <- system.file("specs/thisweek.yml", package = "datalang")
readLines(my_spec, encoding = "UTF-8")
```
```{r example}
library(datalang)
diamantes <- translate_data(my_spec)
head(diamantes)
```
```{r}
create_rd(my_spec)
```