Nothing
## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
options("tibble.print_min" = 5, "tibble.print_max" = 5)
library(magrittr)
library(cohortBuilder)
## -----------------------------------------------------------------------------
librarian_source <- set_source(
as.tblist(librarian)
) %>%
add_step(
step(
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
),
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
)
)
)
## -----------------------------------------------------------------------------
librarian_source <- set_source(
as.tblist(librarian)
) %->%
step(
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
),
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
)
)
## -----------------------------------------------------------------------------
librarian_source <- set_source(
as.tblist(librarian)
) %>%
add_filter(
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
),
step_id = 1
) %>%
add_filter(
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
),
step_id = 1
)
## -----------------------------------------------------------------------------
librarian_source <- set_source(
as.tblist(librarian)
) %->%
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
) %->%
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
)
## -----------------------------------------------------------------------------
librarian_cohort <- cohort(librarian_source)
sum_up(librarian_cohort)
## -----------------------------------------------------------------------------
librarian_source <- set_source(
as.tblist(librarian)
)
librarian_cohort <- librarian_source %>%
cohort(
step(
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
),
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
)
)
)
## -----------------------------------------------------------------------------
librarian_cohort <- librarian_source %>%
cohort(
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
),
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
)
)
## -----------------------------------------------------------------------------
librarian_cohort <- librarian_source %>% cohort()
librarian_cohort %>%
add_step(
step(
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
),
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
)
)
)
## -----------------------------------------------------------------------------
librarian_cohort <- librarian_source %>% cohort()
librarian_cohort %->%
step(
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
),
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
)
)
## -----------------------------------------------------------------------------
librarian_cohort <- librarian_source %>% cohort()
librarian_cohort %>%
add_filter(
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
)
) %>%
add_filter(
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
)
)
## -----------------------------------------------------------------------------
librarian_cohort <- librarian_source %>% cohort()
librarian_cohort %->%
filter(
"discrete", id = "author", dataset = "books",
variable = "author", value = "Dan Brown"
) %->%
filter(
"discrete", id = "program", dataset = "borrowers",
variable = "program", value = "premium", keep_na = FALSE
)
## -----------------------------------------------------------------------------
sum_up(librarian_cohort)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.