podlove_create_example_posts: Create a sample Wordpress "posts" table

Description Usage Arguments Value Examples

View source: R/podlove_create_example_posts.R

Description

This function generates a tibble with sample data corresponding to the Wordpress MySQL database table wp_posts.

Usage

1
podlove_create_example_posts(n_posts, start_date, end_date, seed = NULL)

Arguments

n_posts

number of posts (rows) to generate

start_date

first post's publish date

end_date

last post's publish date

seed

parameter to fix randomization via set.seed()

Value

a tibble with n_posts post entries and corresponding columns

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# random posts
podlove_create_example_posts(n_posts = 20,
                             start_date = "2018-10-25",
                             end_date = "2019-12-24")

# random posts with fixed seed (try several times to see the results are equal)
podlove_create_example_posts(n_posts = 20, 
                             start_date = "2018-10-25", 
                             end_date = "2019-12-24",
                             seed = 10)

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