calculatePADist: Calculate the platform action distribution of a group of...

Description Usage Arguments Value

View source: R/retention_predictors.r

Description

Calculates a platform action distribution for a given group of users over a given time frame. Requires the existence of a pa_flash_cat temporary table.

Usage

1
2
3
calculatePADist(users = NULL, minTime = 0, maxTime = 60, agg = F,
  runDate = as.numeric(gsub(pattern = "-", replacement = "", x = Sys.Date())),
  con = redshift_connection$con)

Arguments

users

A numeric vector of user ids.

minTime

The earliest moment to count platform actions, relative to the users' first platform action. (Numeric, measured in minutes.)

maxTime

The last moment to count platform actions, relative to the users' first platform action. (Numeric, measured in minutes.)

agg

Logical. Should results be reported in aggregate (T) or on an individual basis (F).

runDate

A dateid of the form yyyymmdd (numeric). All dates after the runDate will be filtered out.

con

Database connection to use for query.

Value

A data frame of the form (user_id, platform_action_category, percentage).


johnchower/oneD7 documentation built on May 19, 2019, 4:21 p.m.