knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(datacenter)
The goal of datacenter is to assist in the consolidation of information spread across multiple data sets.
install.packages("datacenter")
You can install the development version of datacenter from Github with:
remotes::install_github("mkearney/datacenter")
Let's say you want to consolidate and maximize information (variables) for obversations spread across multiple different data sets.
## data set with variables v1, v2 data1 <- tibble::tibble( id = c("a", "b", "c"), v1 = c(TRUE, FALSE, FALSE), v2 = c(1, NA_real_, NA_real_) ) ## data set with variables v2, v3 data2 <- tibble::tibble( id = c("b", "c"), v2 = c(2, 3), v3 = c("z", "x") )
Create a data center with a fixed set of variables
## create data center with all variables dc <- new_datacenter(c(names(data1), names(data2))) ## print datacenter dc
## add data1 to datacenter dc$add(data1) dc ## update datacenter with data2 dc$update(data2) dc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.