extend_with: Extend an object

Description Usage Arguments Examples

View source: R/extend_with.R

Description

Extend an object

Usage

1
extend_with(object, .class_name, ...)

Arguments

object

A list

.class_name

A class name to add

...

Extra information in the list

Examples

1
2
3
4
5
6
7
library(purrr)
l <- list(important_number = 42) %>% add_class("my_list")
l %>% extend_with(
  .class_name = "improved_list",
  url = "https://github.com/dynverse/dynverse"
)
l

dynutils documentation built on March 22, 2021, 5:06 p.m.