knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

stickyr

CRAN status R-CMD-check Codecov test coverage

stickyr provides data frames that hold certain columns and attributes persistently for data processing in dplyr. It can also hide specific columns.

Installation

install.packages("stickyr")

Development version

You can install the development version of stickyr from GitHub with:

# install.packages("devtools")
devtools::install_github("UchidaMizuki/stickyr")

Example

library(stickyr)
library(dplyr)

sticky_starwars <- new_sticky_tibble(dplyr::starwars,
                                     cols = c(height, mass, birth_year),
                                     col_show = !birth_year,
                                     col_summary = list(height = mean,
                                                        mass = sum,
                                                        birth_year = median))

sticky_starwars

Select data

sticky_starwars |> 
  select(name, species)

Summarise data

sticky_starwars |> 
  group_by(species) |> 
  summarise()


UchidaMizuki/mainframes documentation built on June 23, 2024, 5:28 p.m.