View source: R/unite_exclusions.R
unite_exclusions | R Documentation |
Each of the mark_*()
functions appends a new column to the data.
The unite_exclusions()
function unites all of those columns in a
single column that can be used to filter any or all exclusions downstream.
Rows with multiple exclusions are concatenated with commas.
unite_exclusions(
x,
exclusion_types = c("duplicates", "duration", "ip", "location", "preview", "progress",
"resolution"),
separator = ",",
remove = TRUE
)
x |
Data frame or tibble (preferably exported from Qualtrics). |
exclusion_types |
Vector of types of exclusions to unite. |
separator |
Character string specifying what character to use to separate multiple exclusion types |
remove |
Logical specifying whether to remove united columns (default = TRUE) or leave them in the data frame (FALSE) |
An object of the same type as x
that includes the all of the same
rows but with a single exclusion
column replacing all of the specified
exclusion_*
columns.
# Unite all exclusion types
df <- qualtrics_text %>%
mark_duplicates() %>%
mark_duration(min_duration = 100) %>%
mark_ip() %>%
mark_location() %>%
mark_preview() %>%
mark_progress() %>%
mark_resolution()
df2 <- df %>%
unite_exclusions()
# Unite subset of exclusion types
df2 <- df %>%
unite_exclusions(exclusion_types = c("duplicates", "duration", "ip"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.