parse_comment_date: Parse dates to add year in PTT post comments

Description Usage Arguments Value

View source: R/parse-date.R

Description

To deal with the problem of loss of information, i.e. a date with its year truncated can't be converted back to the original date, two assumptions are made:

  1. The time interval between (1) the time the post was published and (2) the time the first comment was left is less than 1 year.

  2. The time interval between two adjacent comment is less than 1 year.

Usage

1
parse_comment_date(cmt_df, post_date)

Arguments

cmt_df

A data frame with format almost identical to that returned by get_post_comment, except that the time column has entries with the format of the date in PTT post comments.

post_date

Date. A value returned by ymd_hms.

Value

A data frame with dimension same as the input.


liao961120/pttR documentation built on Dec. 16, 2019, 2:19 a.m.