as.data.frame.classified | R Documentation |
Convert output from classify() to matrix/data.frame/data.table
## S3 method for class 'classified' as.data.frame(x, ...) ## S3 method for class 'classified' as.data.table(x, ...) ## S3 method for class 'classified' as.matrix(x, ...)
x |
output from |
... |
ignored |
data frame/data table with:
first column named as "id" column specified as input
to classify()
and with data from row.names(x)
all columns from classified
no row names
or simply the input matrix without additional attributes
Other classcodes:
all_classcodes()
,
classcodes
,
codebook()
,
print.classcodes()
,
print.classified()
,
set_classcodes()
,
summary.classcodes()
,
visualize.classcodes()
x <- classify(c("C80", "I20", "unvalid_code"), "elixhauser") as.matrix(x)[, 1:3] as.data.frame(x)[, 1:3] data.table::as.data.table(x)[, 1:3] # `as_tibble()` works automatically due to internal use of `as.data.frame()`. tibble::as_tibble(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.