Companions to use_dataset() for inspecting and resetting the session's
default dataset.
Value
get_dataset() returns the default data frame (error if none is set);
has_dataset() returns a logical; clear_dataset() returns TRUE
invisibly; dataset_vars() returns a character vector of column names.
Details
has_dataset() is the safe way to check before calling get_dataset(), which
errors when nothing is set. clear_dataset() removes the default so that
subsequent calls require an explicit data again – useful at the end of a
script or between analyses of different datasets.
See also
Other config:
apply_order(),
edit_ezrsurvey_profile(),
ezrsurvey_options(),
ezrsurvey_profile_paths(),
get_order(),
list_orders(),
load_ezrsurvey_profile(),
order_for(),
register_order(),
register_order_presets(),
remove_order(),
reset_ezrsurvey_options(),
save_ezrsurvey_profile(),
use_dataset(),
use_ezrsurvey_profile()
Examples
has_dataset()
#> [1] FALSE
use_dataset(podracing_survey)
has_dataset()
#> [1] TRUE
nrow(get_dataset())
#> [1] 1000
clear_dataset()
