-
iTerm2
-
Command Line Tools
xcode-select –install
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
// Place your key bindings in this file to override the defaults | |
[ | |
{ | |
"key": "shift+cmd+b", | |
"command": "workbench.action.tasks.runTask", | |
"args": "Build R package", | |
"when": "isRPackage" | |
}, | |
{ | |
"key": "shift+cmd+enter", |
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
// save to windows-user directory | |
linters: with_defaults(object_name_linter = NULL, | |
object_length_linter(50), | |
commented_code_linter = NULL, | |
object_usage_linter = NULL, | |
line_length_linter(120), | |
cyclocomp_linter = cyclocomp_linter(50)) |
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
# further to https://urbandemographics.blogspot.com/2016/04/creating-tilted-and-stacked-maps-in-r.html, | |
# an sf-friendly approach. | |
library(sf) | |
nc <- st_read(system.file('shape/nc.shp', package = 'sf')) | |
plot(nc) | |
sm <- matrix(c(2, 1.2, 0, 1), 2, 2) |
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
server { | |
listen 80; | |
server_name default_server; | |
location ~ ^.*/(?P<request_basename>[^/]+\.(csv))$ { | |
root /www/data/; | |
add_header Content-Disposition 'attachment; filename="$request_basename"'; | |
} | |
} |
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
## Installing required packages for this template | |
required_packages <- c("here", # find your files | |
"dplyr", # clean/shape data | |
"ggplot2", # create plots and charts | |
"sf", # encode spatial vector data | |
"raster", # get and plot GADM shapefiles | |
"ggspatial") # get and plot base maps | |
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
{"lastUpload":"2021-03-11T08:02:06.409Z","extensionVersion":"v3.4.3"} |
var countriesInPortugueseBR = [
{
flag: 'af',
nameEn: 'Afghanistan',
namePt: 'Afeganistão',
},
{
flag: 'za',
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
library(gganimate) # thomasp85/gganimate | |
library(cartogram) | |
library(geogrid) # Need github version jbaileyh/geogrid | |
library(rnaturalearth) | |
library(sf) | |
library(scico) | |
us <- ne_states('united states of america', returnclass = 'sf') | |
us <- us[!us$woe_name %in% c('Alaska', 'Hawaii'), ] | |
us <- st_transform(us, '+proj=eqdc +lat_0=39 +lon_0=-96 +lat_1=33 +lat_2=45 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs') |
Let's say you have streaming data, and you would like to update a DT::datatable
in Shiny without completely re-rendering the table. Here is some code to illustrate how this might be accomplished. Hope it helps.
library(DT)
library(shiny)
ui <- tagList(
tags$script(HTML(
"
Shiny.addCustomMessageHandler(
NewerOlder