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
example <- function(df, column_name, input_vec) { | |
# INPUTS: | |
# df : data frame | |
# column_name : string value of column name in df | |
# input_vec : character vector of values in column_name of df | |
# OUTPUTS: | |
# df : filtered dataframe | |
# Main reason for using this is because df$column_name throws | |
# error as column_name is not a column in df |
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") |
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") |
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
require(ggmap) | |
require(ggrepel) | |
require(dplyr) | |
require(ggplot2) | |
USA = map_data(map = "usa") | |
# Layer 1: USA Map | |
ggplot(USA, aes(x=long, y=lat)) + | |
geom_polygon() + xlab("Longitude (deg)") + ylab("Latitude(deg)") + |