set_lgl.data.frame | R Documentation |
note: for non-binary data, all values other than the true_level will be set to false
## S3 method for class 'data.frame'
set_lgl(.data, ..., true_level = 1L)
set_lgl(.data, ..., true_level = 1L)
## Default S3 method:
set_lgl(.data, ...)
## S3 method for class 'numeric'
set_lgl(.data, ..., true_level = 1L)
## S3 method for class 'character'
set_lgl(.data, ..., true_level = c("T", "TRUE"))
.data |
dataframe |
... |
tidyselect. Default selection: none |
true_level |
specify the value to set as TRUE. Default value is 1 for seamless conversion between logicals and integers. Can be given as a vector of values. |
dataframe
# convert a 1/0 vector back into T/F
tibble::tibble(x = c(1, 0, 0, 1, 0, 1)) %>%
set_lgl(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.