View source: R/BinaryToCensoring.R
BinaryToCensoring | R Documentation |
Helper function for creating censoring columns as factors.
BinaryToCensoring(is.censored, is.uncensored)
is.censored |
binary vector: 0=uncensored, 1=censored |
is.uncensored |
binary vector: 0=censored, 1=uncensored |
Exactly one of is.censored
and is.uncensored
must be specified
as a named argument. All elements of the input vector must be 0, 1,
or NA
an object of class "factor
" with levels "censored" and
"uncensored"
Joshua Schwab jschwab77@berkeley.edu
factor
BinaryToCensoring(is.censored=c(0, 1, 1, 0, NA))
BinaryToCensoring(is.uncensored=c(1, 0, 0, 1, NA)) #the same
## Not run:
BinaryToCensoring(c(0, 1)) #error because the input must be named
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.