field_types_available {daiquiri} | R Documentation |
Types of data fields available for specification
Description
Each column in the source dataset must be assigned to a particular ft_xx
depending on the type of data that it contains. This is done through a
field_types()
specification.
Usage
ft_timepoint(includes_time = TRUE, format = "", na = NULL)
ft_uniqueidentifier(na = NULL)
ft_categorical(aggregate_by_each_category = FALSE, na = NULL)
ft_numeric(na = NULL)
ft_datetime(includes_time = TRUE, format = "", na = NULL)
ft_freetext(na = NULL)
ft_simple(na = NULL)
ft_strata(na = NULL)
ft_ignore()
Arguments
includes_time |
If |
format |
Where datetime values are not in the format |
na |
Column-specific vector of strings that should be interpreted as missing values (in addition to those specified at dataset level) |
aggregate_by_each_category |
If |
Value
A field_type
object denoting the type of data in the column
Details
ft_timepoint()
- identifies the data field which should
be used as the independent time variable. There should be one and only one
of these specified.
ft_uniqueidentifier()
- identifies data fields which
contain a (usually computer-generated) identifier for an entity, e.g. a
patient. It does not need to be unique within the dataset.
ft_categorical()
- identifies data fields which should
be treated as categorical.
ft_numeric()
- identifies data fields which contain numeric values that
should be treated as continuous. Any values which contain non-numeric
characters (including grouping marks) will be classed as non-conformant
ft_datetime()
- identifies data fields which contain date
values that should be treated as continuous.
ft_freetext()
- identifies data fields which contain
free text values. Only presence/missingness will be evaluated.
ft_simple()
- identifies data fields where you only
want presence/missingness to be evaluated (but which are not necessarily
free text).
ft_strata()
- identifies a categorical data field which should
be used to stratify the rest of the data.
ft_ignore()
- identifies data fields which should be
ignored. These will not be loaded.
See Also
field_types()
, template_field_types()
Examples
fts <- field_types(
PatientID = ft_uniqueidentifier(),
TestID = ft_ignore(),
TestDate = ft_timepoint(),
TestName = ft_categorical(aggregate_by_each_category = FALSE),
TestResult = ft_numeric(),
ResultDate = ft_datetime(),
ResultComment = ft_freetext(),
Location = ft_categorical()
)
ft_simple()