knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
knitr::opts_chunk$set(warning = TRUE, message = TRUE, echo = FALSE, error = FALSE) library(codebook) data("bfi", package = 'codebook') bfi2 = zap_attributes(bfi) bfi2[,1:5] <- bfi[,1:5] bfi <- bfi2 bfi$age <- 1:nrow(bfi) bfi$abode <- rep("my happy place", times = nrow(bfi)) latent <- rnorm(nrow(bfi)) bfi$normal1 <- latent + rnorm(nrow(bfi)) bfi$normal2 <- latent + rnorm(nrow(bfi)) bfi$normal3 <- latent + rnorm(nrow(bfi)) bfi$normal4 <- latent + rnorm(nrow(bfi)) bfi$normal <- bfi %>% dplyr::select(dplyr::starts_with("normal")) %>% rowMeans() var_label(bfi$abode) <- "Where do you live?" bfi$uniq_id <- as.character(1:nrow(bfi)) var_label(bfi$uniq_id) <- "Unique ID" ggplot2::theme_set(ggplot2::theme_bw()) bfi$age <- rpois(nrow(bfi), 30) # class(bfi$age) = c("udhfibr") bfi <- detect_scales(bfi)
codebook(bfi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.