-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
69 lines (48 loc) · 1.63 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
61
62
63
64
65
66
67
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ubigeosperu
<!-- badges: start -->
[![Project Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![CRAN status](https://www.r-pkg.org/badges/version/ubigeosperu)](https://cran.r-project.org/package=ubigeosperu)
<!-- badges: end -->
The goal of ubigeosperu is to have an easy way to get the peruvian ubigeos into R. The data has been collected from CONCYTEC's GitHub [repository](https://github.com/CONCYTEC/ubigeo-peru/blob/master/equivalencia-ubigeos-oti-concytec.csv).
## Installation
You can install the released version of ubigeosperu from [CRAN](https://CRAN.R-project.org) with:
``` r
## This will work when the package is published into CRAN
install.packages("ubigeosperu")
```
And the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("calderonsamuel/ubigeosperu")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r library, message=FALSE}
library(ubigeosperu)
library(dplyr)
```
ubigeosperu contains a single dataframe object containing the peruvian ubigeos codes.
```{r dim, message=FALSE}
dim(ubigeos)
```
The ubigeos dataset is a tibble.
```{r tibble, message=FALSE}
ubigeos
```
You can access the tidy version and pipe it!
```{r tidy, message=FALSE}
ubigeos_tidy %>%
filter(lugar == "CHORRILLOS", nivel == "Distrito")
```