knitr::opts_chunk$set(echo = FALSE, warning = FALSE) knitr::opts_chunk$set(fig.width = 7, fig.height = 5) library(tidyverse) # map, mutate, filter, gather, select, group_by, summarize library(knitr) library(wkFocus) ## Set local vignette parameters ds_list_name <- paste0(params$dataset, "_focus")
r ds_list_name
' codings"## Read dataset from package data into "Global" environment load(file.path("..", "data", paste0(ds_list_name, ".rda"))) # Flip parameter to a "Global" symbol to be used throughout vignette ds_list <- eval(as.symbol(ds_list_name))
nsets <- length(ds_list) sessions <- ds_list %>% map_chr(c("ds_id", "sid")) coders <- ds_list %>% map_chr(c("ds_id", "coder")) versions <- ds_list %>% map_chr(c("ds_id", "version")) ## For display, get sids and data dimensions into a df tmp <- ds_list %>% map_df("ds_id") ds_list %>% map_df( ~ list(obs = nrow(.x$data), vars = ncol(.x$data))) %>% bind_cols(tmp, .) %>% kable(caption = paste("Datasets in", ds_list_name)) rm(tmp)
## pick datasets to sample to_comp <- c(A = params$codingA, B = params$codingB) time_step <- params$timestep # sec
### Sessions: `r sessions[to_comp]`; Coders: `r coders[to_comp]`; Versions: `r versions[to_comp]`.
wzxhzdk:4
wzxhzdk:5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.