View source: R/api-export-bundles.R
| normalize_conquest_overlap_files | R Documentation |
mfrmr review contractNormalize extracted ConQuest overlap files to the mfrmr review contract
normalize_conquest_overlap_files(
population_file,
item_file,
case_file,
population_delimiter = c("auto", "comma", "tab", "semicolon", ",", "\t", ";"),
item_delimiter = c("auto", "comma", "tab", "semicolon", ",", "\t", ";"),
case_delimiter = c("auto", "comma", "tab", "semicolon", ",", "\t", ";"),
conquest_population_term = "auto",
conquest_population_estimate = "auto",
conquest_item_id = "auto",
conquest_item_estimate = "auto",
conquest_case_person = "auto",
conquest_case_estimate = "auto",
keep_extra_columns = TRUE
)
population_file |
Path to an extracted ConQuest population-parameter table in CSV/TSV/TXT form. |
item_file |
Path to an extracted ConQuest item-estimate table in CSV/TSV/TXT form. |
case_file |
Path to an extracted ConQuest case-level EAP table in CSV/TSV/TXT form. |
population_delimiter |
Delimiter for |
item_delimiter |
Delimiter for |
case_delimiter |
Delimiter for |
conquest_population_term |
Column in |
conquest_population_estimate |
Column in |
conquest_item_id |
Column in |
conquest_item_estimate |
Column in |
conquest_case_person |
Column in |
conquest_case_estimate |
Column in |
keep_extra_columns |
If |
This helper is a thin file-wrapper around normalize_conquest_overlap_tables().
It is intentionally limited to already extracted tabular files and does not
parse raw ConQuest report text.
The recommended workflow is:
export an exact-overlap bundle with build_conquest_overlap_bundle();
extract the relevant ConQuest tables to CSV/TSV/TXT files;
call normalize_conquest_overlap_files() on those files;
pass the result to review_conquest_overlap().
Read summary(normalized)$normalization_scope before review to confirm
that the files were treated as extracted tables, not raw ConQuest report
text, and to check duplicate-ID / non-numeric-estimate pre-review flags.
A named list with class mfrm_conquest_overlap_tables.
normalize_conquest_overlap_tables(), review_conquest_overlap()
bundle <- build_conquest_overlap_bundle()
tmp_dir <- tempdir()
pop_path <- file.path(tmp_dir, "cq_pop.csv")
item_path <- file.path(tmp_dir, "cq_item.tsv")
case_path <- file.path(tmp_dir, "cq_case.csv")
utils::write.csv(
data.frame(
Term = bundle$mfrmr_population$Parameter,
Est = bundle$mfrmr_population$Estimate
),
pop_path,
row.names = FALSE
)
utils::write.table(
data.frame(
Item = bundle$mfrmr_item_estimates$ResponseVar,
Est = bundle$mfrmr_item_estimates$Estimate
),
item_path,
sep = "\t",
row.names = FALSE
)
utils::write.csv(
data.frame(
PID = bundle$mfrmr_case_eap$Person,
EAP = bundle$mfrmr_case_eap$Estimate
),
case_path,
row.names = FALSE
)
normalized <- normalize_conquest_overlap_files(
population_file = pop_path,
item_file = item_path,
case_file = case_path,
conquest_population_term = "Term",
conquest_population_estimate = "Est",
conquest_item_id = "Item",
conquest_item_estimate = "Est",
conquest_case_person = "PID",
conquest_case_estimate = "EAP"
)
summary(normalized)$normalization_scope
review <- review_conquest_overlap(bundle, normalized)
summary(review)$summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.