R/import_data.R
ImportData.Rd
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)
Character string or dataframe. Collected data file path or dataframe object.
Character string. Social media type of collected data twitter
, youtube
or
reddit
.
Character string. Type of file or file format of file to import csv
or rds
. Default is
NULL
to use extension.
Logical. Output additional information. Default is FALSE
.
A dataframe with datasource and socialmedia class attributes.
if (FALSE) {
# import collected data from file
twitter_data <- ImportData("./data.csv", "twitter")
# import collected data from dataframe
twitter_data <- ImportData(rtweet_data, "twitter")
}