knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

tidygapminder

Build Status codecov Build status Project Status: Active – The project has reached a stable, usable state and is being actively developed.

tidygapminder is designed to make easy to tidy data retrieved from Gapminder. Learn more in vignette("tidygapminder").

Installation

You can install the released version of tidygapminder from CRAN with:

install.packages("tidygapminder")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("ebedthan/tidygapminder")

Example

This is a basic example which shows you how to solve a common problem:

library(tidygapminder)

# From ----------------------------------
df <- readxl::read_xlsx(system.file("extdata", "agriculture_land.xlsx", package = "tidygapminder"))

df

# To ------------------------------------
file <- system.file("extdata", "agriculture_land.xlsx", package = "tidygapminder")

tidy_indice(file)

Or more powerful:

# From ----------------------------------------

path <- system.file("extdata", package = "tidygapminder")

list.files(path)

df

df_ <- data.table::fread(system.file("extdata", "life_expectancy_years.csv", package = "tidygapminder"))

df_

# To ------------------------------------------

tidy_bunch(dirpath = path, merge = TRUE)

Enjoy r emo::ji("smile") !!!



Ebedthan/tidygapminder documentation built on May 31, 2020, 3:47 a.m.