View source: R/prep_fix_meta_id_dups.R
| prep_fix_meta_id_dups | R Documentation |
if VAR_NAMES have duplicates, maybe, it's because of ID-vars assigned
to different study segments multiple times (they should be in one "intro"-
segment, only), which is not the intended use of STUDY_SEGMENT.
Naturally, they will be part of more than one data-frame, so
this would also qualify for a dump duplicate, only, which can safely be
removed. Only ID-vars are by default assumed to have such duplicates in item
level metadata allowed.
prep_fix_meta_id_dups(
meta_data_segment = "segment_level",
meta_data_dataframe = "dataframe_level",
item_level = "item_level",
meta_data = item_level,
meta_data_v2,
segment_level,
dataframe_level
)
meta_data_segment |
data.frame – optional: Segment level metadata |
meta_data_dataframe |
data.frame the data frame that contains the metadata for the data frame level |
item_level |
data.frame the data frame that contains metadata attributes of study data |
meta_data |
data.frame old name for |
meta_data_v2 |
character path to workbook like metadata file, see
|
segment_level |
data.frame alias for |
dataframe_level |
data.frame alias for |
meta_data
## Not run:
il <- prep_get_data_frame("item_level")
il <- rbind(il, il)
il$STUDY_SEGMENT[2] <- "X"
il2 <- prep_fix_meta_id_dups(meta_data_v2 = "meta_data_v2", item_level = il)
il2$STUDY_SEGMENT
il$STUDY_SEGMENT[3] <- "X"
il3 <- prep_fix_meta_id_dups(meta_data_v2 = "meta_data_v2", item_level = il)
il3$STUDY_SEGMENT
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.