R/entity-attribute-value.R
cast_covariate.Rd
For most things, a single value will be returned from each cast, but in the
case of "time_to_event" data, the value is expended to a two column
data.frame with a tte_<covariate>
column for time to event, and an
event_<covariate>
column to indicate event (1) or right censored (2).
cast_covariate(covariate, values, cov.def, .fds)
covariate | the name of the covariate |
---|---|
values | the covariate values (which is a |
cov.def | the un-yamled covariate definitions, if missing we rely on
pulling this out from the |
.fds | If |
values cast to appropriate type if a valid definition was found for
covariate
, otherwise values is returned "as is". Most of the time
this is a single vector, but others it can be a data.frame (for
right_censored
data, for instance)
The mechanics of how values in the sample_covariate
table are converted
into R objects are handled by the information stored in the
FacileDataSets
's meta.yaml
file.