Imports collected data from file or dataframe. Ensures datasource and specified socialmedia type are set so data is usable by Create functions. Not required if collected data was collected by vosonSML and saved as an rds file, use readRDS instead.

ImportData(data, socialmedia, type = NULL, verbose = FALSE)

Arguments

data

Character string or dataframe. Collected data file path or dataframe object.

socialmedia

Character string. Social media type of collected data twitter, youtube or reddit.

type

Character string. Type of file or file format of file to import csv or rds. Default is NULL to use extension.

verbose

Logical. Output additional information. Default is FALSE.

Value

A dataframe with datasource and socialmedia class attributes.

Examples

if (FALSE) {
# import collected data from file
twitter_data <- ImportData("./data.csv", "twitter")

# import collected data from dataframe
twitter_data <- ImportData(rtweet_data, "twitter")
}