pivot_trts_widelist: Pivot treatments to a wider list or table format

View source: R/pivot.R

pivot_trts_widelistR Documentation

Pivot treatments to a wider list or table format

Description

Pivot treatments to a wider list or table format

Usage

pivot_trts_widelist(.data, trts = NULL, fcts = NULL, drop = FALSE)

pivot_trts_widetable(.data, trts = NULL, fcts = NULL)

Arguments

.data

An edibble table.

trts

A vector of treatment (tidyselect compatible). By default it is NULL and includes all the treatments.

fcts

A vector of factors in the edibble table.

drop

Whether the resulting list should drop to a vector within each list element if there is only one column. Default is FALSE.

Value

A named list where elements are the data and the names are treatments.

Examples

pivot_trts_widelist(takeout(menu_crd(t = 5, n = 20)))

edibble documentation built on June 22, 2024, 11:04 a.m.