show_constant {gmoTree} | R Documentation |
Show constant columns
Description
Show all variables with no variation in their values within each data frame of the list of data frames (except the ones in the info list). This function is useful for identifying unnecessary variables before running an experiment. It allows checking for columns with any unchanging value or only a specific value.
Usage
show_constant(oTree, value = "any")
Arguments
oTree |
A list of data frames created
with |
value |
The value that is controlled to be the same within a column.
If the value is set to |
Value
This function returns a list of vectors, one for each app,
$all_apps_wide
, the $Time
and/or the $Chats
data frame.
Each vector contains the names of all variables with constant values.
If there are no variables with constant values, the vector is empty.
Examples
# Use package-internal list of oTree data frames
oTree <- gmoTree::oTree
# Show all columns that contain only NAs
show_constant(oTree = oTree)
show_constant(oTree = oTree, value = NA)
# Show all columns that contain only -99
show_constant(oTree = oTree, value = -99)