Get users from builds
get_users.RdThis function filters out builds with no new users, calculates cumulative sums of new users, generates user IDs, and unnests the user IDs into a single column. It also assigns each user a random activity start date between the release start and end dates of the build. Defaults to a maximum of 2 new users per build.
Arguments
- builds
 A data frame of builds. This should be the output of the
set_build_releasesfunction and should include anew_userscolumn.- new_users_max
 The maximum number of new users. This is used to generate a random number of new users for each build. Default is 2.
- max_activity_days
 The maximum number of days for which to generate activity data. Default is 30.
Value
A data frame with user IDs, the build they belong to, their activity start date, and the number of activity days for each new user in each build.
Examples
builds <- get_versions()
builds <- set_build_releases(builds, release_length_max = 30)
get_users(builds)
#> # A tibble: 5 × 4
#>   user   first_build activity_start activity_days
#>   <chr>  <chr>       <date>                 <int>
#> 1 user_1 0.0.0       2023-01-09                 1
#> 2 user_2 0.0.0       2023-01-09                 5
#> 3 user_3 0.0.1       2023-01-16                 5
#> 4 user_4 0.0.1       2023-01-16                 5
#> 5 user_5 1.0.0       2023-01-29                 2