Functions to check if an object is of class incadata
, or coerce it if
possible.
as.incadata(x, ...)is.incadata(x)
# S3 method for data.frame
as.incadata(x, decode = TRUE, id = TRUE, ask = TRUE,
...)
# S3 method for default
as.incadata(x, n_i = NULL, ...)
vector or data frame with data from INCA or Rockan.
arguments passed to exceed_threshold
Should decode
be applied to variables with
identified variable names? (TRUE
by default).
Should an id-column be added? This is based on PERSNR/PNR/PAT_ID if
available (in that order) but is not set to NA
for non valid pins
(see as.pin
).
ask for input if unsure how to coerce variables
used internally
as.incadata.data.frame
object of class
incadata
based on the "tibble"-class used within the "tidyverse"
as.incadata.default
input coerced to relevant class
is.incadata
TRUE
if its argument is of class
incadata
and FALSE
otherwise.
If the function is called on a "big" data set, it might be time consuming and
it might be quite verbose about performed class transformation. It would
probably be worth the time when run locally for a specified task but if run
as production code on INCA, some caution might be advised! Use
suppressMessages
to avoid the verbose output.