knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = FALSE )
library(cleanETHPOP) library(dplyr) library(tidyr) library(readr) library(reshape2)
where_data_Leeds1 <- system.file("extdata", "Leeds1", "Births", package = "cleanETHPOP") where_data_Leeds2 <- system.file("extdata", "Leeds2", "Births", package = "cleanETHPOP") clean_births(dir_path = where_data_Leeds1, save_name = "clean_births_Leeds1") clean_births(dir_path = where_data_Leeds2, save_name = "clean_births_Leeds2")
where_data_Leeds1 <- system.file("extdata", "Leeds1", "Deaths", package = "cleanETHPOP") where_data_Leeds2 <- system.file("extdata", "Leeds2", "Deaths", package = "cleanETHPOP") clean_deaths(dir_path = where_data_Leeds1, save_name = "clean_deaths_Leeds1") clean_deaths(dir_path = where_data_Leeds2, save_name = "clean_deaths_Leeds2")
where_data_Leeds1 <- system.file("extdata", "Leeds1", "Population", package = "cleanETHPOP") where_data_Leeds2 <- system.file("extdata", "Leeds2", "Population", package = "cleanETHPOP") clean_pop(dir_path = where_data_Leeds1, save_name = "clean_pop_Leeds1") clean_pop(dir_path = where_data_Leeds2, save_name = "clean_pop_Leeds2")
There are 2 different scenario available:
where_data_Leeds1 <- system.file("extdata", "Leeds1", "InMigrants", package = "cleanETHPOP") where_data_Leeds2 <- system.file("extdata", "Leeds2", "InMigrants", package = "cleanETHPOP") clean_inmigrants(dir_path = where_data_Leeds1, save_name = "clean_inmigrants_Leeds1") clean_inmigrants(dir_path = where_data_Leeds2, save_name = "clean_inmigrants_Leeds2")
where_data_Leeds1 <- system.file("extdata", "Leeds1", "OutMigrants", package = "cleanETHPOP") where_data_Leeds2 <- system.file("extdata", "Leeds2", "OutMigrants", package = "cleanETHPOP") clean_outmigrants(dir_path = where_data_Leeds1, save_name = "clean_outmigrants_Leeds1") clean_outmigrants(dir_path = where_data_Leeds2, save_name = "clean_outmigrants_Leeds2")
outmigrants_per_capita()
# run this to create html doc for GitHub rmarkdown::render("vignettes/how-to-use-package.Rmd", output_dir = "docs/", output_format = "html_document")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.