Created
February 24, 2017 21:00
-
-
Save sharan-naribole/4db35f7b793796ba8309388b066b495c to your computer and use it in GitHub Desktop.
Example to illustrate using rdrop2 to access Dropbox files on Shiny server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
token <- drop_auth() | |
saveRDS(token, "droptoken.rds") | |
# Upload droptoken to your server | |
# ** Don't share this with anyone ** | |
# You can then revoke the rdrop2 app from your | |
# dropbox account and start over. | |
# ******** WARNING ******** | |
# read it back with readRDS | |
token <- readRDS("droptoken.rds") | |
# Then pass the token to each drop_ function | |
#My example | |
drop_get(path = 'h1b_data/h1b_shiny_compact.rds', | |
local_file = 'h1b_shiny_compact.rds', | |
dtoken = token, | |
overwrite = TRUE, | |
progress = TRUE) | |
# Main data frame for data analysis | |
h1b_df <- readRDS('h1b_shiny_compact.rds') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment