Learn R Programming

vosonSML (version 0.23.4)

SaveCredential: Save and load credential information

Description

Functions to save and load credential information. Currently, credential information will be stored as a RDS file. SaveCredential will return the input credential, useful for working as a filter between the Authenticate and Collect.

Usage

SaveCredential(credential, filename = "credential.RDS")

LoadCredential(filename = "credential.RDS")

Arguments

credential

credential object

filename

character, filename to be saved to or restored from

Value

credential object

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
require(magrittr)
myAppID <- "123456789098765"
myAppSecret <- "abc123abc123abc123abc123abc123ab"
myUsernames <- c("senjohnmccain","obama")

Authenticate("instagram",
appID = myAppId,
appSecret = myAppSecret) %>% SaveCredential("instagramCred.RDS") %>% Collect(ego = TRUE,
username = myUsernames) %>% Create

## Load the previously saved credential information
LoadCredential("instagramCred.RDS") %>% Collect(tag="obama",
distance=5000, n=100) %>% Create("bimodal")
# }

Run the code above in your browser using DataLab