teal_slice-utilities: 'teal_slice' utility functions

teal_slice-utilitiesR Documentation

teal_slice utility functions

Description

Helper functions for working with teal_slice object.

Usage

is.teal_slice(x)

as.teal_slice(x)

## S3 method for class 'teal_slice'
as.list(x, ...)

## S3 method for class 'teal_slice'
format(x, show_all = FALSE, trim_lines = TRUE, ...)

## S3 method for class 'teal_slice'
print(x, ...)

Arguments

x

(teal.slice)

...

additional arguments passed to other functions.

show_all

(logical(1)) indicating whether to show all fields. If set to FALSE, only non-NULL elements will be printed.

trim_lines

(logical(1)) indicating whether to trim lines when printing.

Examples

x1 <- teal_slice(
  dataname = "data",
  id = "Female adults",
  expr = "SEX == 'F' & AGE >= 18",
  title = "Female adults"
)
x2 <- teal_slice(
  dataname = "data",
  varname = "var",
  choices = c("F", "M", "U"),
  selected = "F",
  keep_na = TRUE,
  keep_inf = TRUE,
  fixed = FALSE,
  anchored = FALSE,
  multiple = TRUE,
  id = "Gender",
  extra_arg = "extra"
)

is.teal_slice(x1)
as.list(x1)
as.teal_slice(list(dataname = "a", varname = "var"))
format(x1)
format(x1, show_all = TRUE, trim_lines = FALSE)
print(x1)
print(x1, show_all = TRUE, trim_lines = FALSE)


teal.slice documentation built on May 29, 2024, 1:39 a.m.