add_category: Append universe with existing category

View source: R/add_category.R

add_categoryR Documentation

Append universe with existing category

Description

This appends an existing universe() object with an existing category() object. This does the same checks done in universe() but just on what is passed to category().

Usage

add_category(universe, category)

Arguments

universe

Output object from universe().

category

Output object from category().

Value

A list with special class universe.

Examples

uni <- universe(
    data = mtcars,

    category(
        name = "vs",
        groups = c(0, 1),
        targets = c(1/2, 1/2)
    )
)

cat <- category(
    name = "am",
    groups = c(0, 1),
    targets = c(1/3, 2/3)
)

add_category(uni, cat)


ttrodrigz/iterake documentation built on March 27, 2024, 12:48 a.m.