Description Usage Arguments Details Value See Also
View source: R/clean-perch-data.R
clean_perch_data
transforms a raw data table (row for subject, column
for variable - usually {pathogen name}_{specimen}
and other covariate
names) into a list. It is specific for PERCH data format.
1 | clean_perch_data(clean_options)
|
clean_options |
The list of options for cleaning PERCH data. Its elements are defined as follows:
|
It deletes cases (Y==1
) having two positives
for BCX measures. We suggest put c("newSITE","ENRLDATE")
in
X_extra
and X_order_obs
to order cases and controls separately
according to site and enrollment date. In current implementation,
the raw data must have both BrS and SS measurements.
A List: list(Mobs,Y,X,JSS,pathogen_BrS_ordered_by_MSS,pathogen_BrS_cat)
, or
with additional JSSonly, pathogen_SSonly_cat
if silver-
standard only pathogens are supplied.
Mobs
A list of bronze- (MBS
), silver- (MSS
),
and gold-standard (MGS
, if available) measurements. Here if all
pathogens have BrS measures, MSS has the same number of columns as in MBS;
if some pathogens only have SS measures, then MSS will have extra columns;
Y
1 for case; 0 for control;
X
Data frame of covariates for cases and controls. The covariate
names are specified in X_extra
;
JSS
Number of pathogens having both silver- and bronze-standard
data;
pathogen_BrS_ordered_by_MSS
Ordered vector of pathogen names. Pathogens
with both SS and BrS pathogens are ordered first and then those with only BrS
measurements. Note that for a pathogen name vector of arbitrary order
(pathogen_BrS_anyorder
), this function just picks out those pathogens
with BrS+SS measures and puts them at the front. Other pathogens with only
BrS measures are not reordered. Pathogens with only silver-standard measures
are not included.
pathogen_BrS_cat
Pathogen categories ordered according to
pathogen_BrS_ordered_by_MSS
.
JSSonly
Number of pathogens with only silver-standard measures;
pathogen_SSonly_cat
Category of pathogens with only silver-standard
data.
extra_Mobs
extra measurements as requested by extra_meas_nm
.
This function does not re-order pathogens that only have silver-standard data.
parse_date_time
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.