R/import_data.R
vosonSML-colon-colon-ImportData.RdImports 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)
| data | Character string or dataframe. Collected data file path or dataframe object. |
|---|---|
| socialmedia | Character string. Social media type of collected data |
| type | Character string. Type of file or file format of file to import |
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") }