knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of ds303pkg is to fulfill an assignment for Calvin's Spring 2022 Data-303 class.
The deployed site can be found here.
You can install the development version of ds303pkg like so:
# install.packages("devtools") devtools::install_github("adamddh/ds303pkg")
This is a basic example which shows you how to apply a function to all columns that fit a condition in a data frame, and apply a different function otherwise:
library(ds303pkg) n <- 7L test_data <- dplyr::tibble( double = c( 94.51994, 99.01343, 96.92028, 88.99951, 89.57307, 94.56710, 98.32601 ), integer = (1L:n) * (1L:n), character = LETTERS[1L:n], factor = factor(letters[1L:n]), logical = rep(c(TRUE, FALSE), length.out = n) ) test_data |> df_apply(round, is.numeric, as.factor, digits = -1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.