Generates n random athlete profiles and registers them under an existing
sandbox sport org, so sandbox fetch_profiles() / fetch_profile() return
prod-shaped data. The org must already exist (see create_sport_org()).
Arguments
- n
Integer. Number of profiles to create.
- sport_org_id
Integer. Id of the sport org (from
create_sport_org()) the athletes belong to. Stored as each profile'ssport$id(the filterfetch_profiles(filters = list(sport_org_id = ...))uses), and its name becomes each profile'ssport$name. The org must already exist.- first_names, last_names
Character vectors of length
ngiving each athlete's first and last name. Provide both or neither. When both areNULL(default),nunique first/last pairs are drawn without replacement from thebabynamesdataset, so every athlete name is distinct.
Examples
org <- create_sport_org("Rowing Canada")
#> csiapps sandbox: created sport org 173 ('Rowing Canada')
create_profile(2, org$id, first_names = c("Ada", "Blair"),
last_names = c("Nkemelu", "Okafor"))
#> csiapps sandbox: created 2 athlete(s) under sport org 173 (2 total)
clear_sandbox()
#> csiapps sandbox: entire sandbox cleared
