Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

selectall

Make a column for "select all" input


Description

Make a column for "select all" input

Usage

selectall(...)

as.selectall(x)

## S3 method for class 'selectall'
as.matrix(x, ...)

## S3 method for class 'selectall'
x[i, j, drop = FALSE]

## S3 method for class 'selectall'
is.na(x)

is.selectall(x)

Arguments

...

Named arguments of the same length. These should be logical, numeric (0/1) or a factor with two levels.

x

An object of class "selectall"

i, j, drop

Arguments to '[.matrix'

See Also

Examples

d <- data.frame(grp = rep(c("A", "B"), each = 5))
d$s <- selectall(
  `Option 1` = c(rep(1, 4), rep(0, 6)),
  `Option 2` = c(0, 1, 0, 0, 0, 1, 1, 1, 0, 0),
  `Option 3` = 1,
  `Option 4` = 0
)
summary(tableby(grp ~ s, data = d), text = TRUE)

arsenal

An Arsenal of 'R' Functions for Large-Scale Statistical Summaries

v3.6.2
GPL (>= 2)
Authors
Ethan Heinzen [aut, cre], Jason Sinnwell [aut], Elizabeth Atkinson [aut], Tina Gunderson [aut], Gregory Dougherty [aut], Patrick Votruba [ctb], Ryan Lennon [ctb], Andrew Hanson [ctb], Krista Goergen [ctb], Emily Lundt [ctb], Brendan Broderick [ctb], Maddie McCullough [art]
Initial release
2021-02-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.