View source: R/delete_duplicate.R
delete_duplicate | R Documentation |
Delete duplicate rows from all app data frames
and $all_apps_wide
.
delete_duplicate(oTree)
oTree |
A list of data frames created
with |
This function returns a duplicate of the original oTree
list of data frames but without duplicate rows in all app data
frames and $all_apps_wide
.
This function does not modify the custom export data frames and the
the $Time
and $Chats
data frames.
This function does NOT add information to $info$deleted_cases
,
because it does not delete any important information but only
cleans up a messy data import.
However, the function adjusts $info$initial_n
, if
an $all_apps_wide
data frame exists.
# Set data folder first
withr::with_dir(system.file("extdata", package = "gmoTree"), {
# Import all oTree files in this folder and its subfolders
oTree <- import_otree()
})
# First, show some row numbers
print(paste(nrow(oTree$all_apps_wide), nrow(oTree$survey),
nrow(oTree$Time), nrow(oTree$Chats)))
# Delete duplicate rows
oTree <- delete_duplicate(oTree)
# Show row numbers again
print(paste(nrow(oTree$all_apps_wide), nrow(oTree$survey),
nrow(oTree$Time), nrow(oTree$Chats)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.