Skip to contents

Set option parameters for sb_get_profile()

Usage

sb_get_profile_option(
  interactive_mode = TRUE,
  include_user_data = TRUE,
  cache = TRUE,
  include_missing_user = FALSE,
  guess_col_type = TRUE,
  include_uuid = FALSE
)

Arguments

interactive_mode

If TRUE, all messages are printed to the console. If FALSE, they are suppressed. The idea is that interactive_mode should be set to FALSE in automated environments to ensure logs aren't clogged up with progress messages.

include_user_data

If TRUE, information like the athlete's full name (i.e. about) is attached to the exported data frame. Setting this to FALSE can improve query performance since sb_get_event() doesn't need to make an extra API call to grab the user data.

cache

If TRUE, login token and user details are cached once per session. Similar to include_user_data, caching can have performance benefits when the user data set is large, such as on large Smartabase sites with thousands of users. To invalidate the cache, restart your R session.

include_missing_user

If TRUE, includes users who have not recorded data in that form as rows of NA values.

guess_col_type

If TRUE, sb_get_event() uses readr::type_convert() to guess the column types of the exported data frame. If FALSE, all columns will come through as character.

include_uuid

If TRUE, each athlete's user-defined UUID (universally unique identifier) is attached to the exported data frame. Note, this is different to user_id, which is automatically generated by Smartabase.

Value

A list of options with class = "sb_export_option"

Examples

if (FALSE) { # \dontrun{
# Calling the function with no arguments returns all the defaults
sb_get_profile_option()

# Specifying specific arguments will alter those arguments alone while still
# returning the other defaults
sb_get_profile_option(guess_col_type = FALSE, interactive_mode = FALSE)
} # }