podlove_downloads_until: Calculate download sums at point(s) in time

Description Usage Arguments Value Examples

View source: R/podlove_downloads_until.R

Description

This function takes a tidy table of downloads and creates a table containing the number of downloads at specified points_in_time in hours or days. Episodes with an episode age younger than point_in_time will be excluded. Can be used to generate data for regression models.

Usage

1
podlove_downloads_until(df_tidy_data, points_in_time, time_unit = "days")

Arguments

df_tidy_data

a tidy table of downloads created by podlov_clean_stats() or podlove_get_and_clean()

points_in_time

Measurement points in time relative to episode release in hours or days. Can be a single value or a vector of integers.

time_unit

Time unit of points_in_time, either "days" (default) or "hours".

Value

A tidy table of episode downloads at the specified points in time, along with episode-related fields

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run:  
# downloads after 3 days
podlove_downloads_until(podcast_example_data, points_in_time = 3)

# downloads after 12 hours
podlove_downloads_until(podcast_example_data, points_in_time = 12,
                      time_unit = "hours")

# downloads after 1, 3, and 10 days
podlove_downloads_until(podcast_example_data, points_in_time = c(1, 3, 10))

## End(Not run)

lordyo/podlover documentation built on Feb. 20, 2020, 5:58 p.m.