merge_facebook_data: Merge Facebook rds files from different folders

Description Usage Arguments Value

View source: R/merge_data.R

Description

This function merges rds files of the same name from two different folders. It calls merge_data with parameters for Facebook data collected through this package's update function. Data from the file in old_folder is kept, data from new_folder is added but only kept if rows with the same id do not exist already.

Usage

1
2
3
4
5
6
7
merge_facebook_data(
  old_folder,
  new_folder,
  output_folder,
  keep_newest = TRUE,
  ignore_scrape_time = FALSE
)

Arguments

old_folder

Folder to look for old rds files.

new_folder

Folder to look for new rds files.

output_folder

Folder to save merged rds files to.

keep_newest

Logical, indicating which version of a duplicate Tweet is kept. If TRUE (default), the newest Tweets according to scrape date are kept. Furthermore, Tweets from files in the new_folder are preferred over those from old_folder. FALSE prefers older data.

ignore_scrape_time

Logical, indicating whether the scrape time should be ignored for deciding which texts to keep. Defaults to FALSE. If TRUE, only age only depends on where the file is stored (old or new folder).

Value

A data.frame with the results.


jogrue/socmedhelpeRs documentation built on April 24, 2020, 2:09 p.m.