For the development version of R-devel which will become 4.3.0, there is a new warning in R CMD check
that comes up for some packages:
* checking C++ specification ... NOTE
Specified C++11: please drop specification unless essential
For the development version of R-devel which will become 4.3.0, there is a new warning in R CMD check
that comes up for some packages:
* checking C++ specification ... NOTE
Specified C++11: please drop specification unless essential
library(duckdb) | |
library(DBI) | |
library(glue) | |
library(dplyr) | |
conn <- DBI::dbConnect(duckdb(), ":memory:", | |
config=list("memory_limit"="12GB", | |
"temp_directory" = "/tmp")) | |
DBI::dbExecute(conn, "INSTALL 'httpfs';") | |
DBI::dbExecute(conn, "LOAD 'httpfs';") |
#### --------------------------------------------- | |
## Edit via: RStudio > Tools > Edit Code Snippets | |
# Released under a MIT license | |
snippet fragment | |
[${1:text}]{.${2:type}} | |
snippet aside | |
[${1:text}]{.aside} | |
// 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)) |
# If you haven't installed homebrew, see some instructions here: | |
# https://github.com/bcgov/envreportutils/wiki/Macbook-Pro-Setup-for-Data-Science-at-EnvReportBC#homebrew | |
# These have not been tested on macOS Catalina, but the Mojave instructions _should_ work. | |
# If you run into issues, this looks like it might be helpful: | |
# https://medium.com/faun/macos-catalina-xcode-homebrew-gems-developer-headaches-cf7b1edf10b7 | |
# The osgeo homebrew tap is in a bit of a mess, so `brew install saga-gis` doesn't work (as of 2019-10-30). | |
# This is because SAGA dependencies have been updated, but they haven't updated the brew formula for SAGA itself. | |
# Same goes for QGIS; and now that there is a fully self-contained signed installer, I recommend that over heomebrew for QGIS | |
# (https://qgis.org/en/site/forusers/download.html) |
# Luke's config for the Zoomer Shell | |
# Enable colors and change prompt: | |
autoload -U colors && colors | |
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " | |
# History in cache directory: | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
HISTFILE=~/.cache/zsh/history |
## pkgs | |
pacman::p_load(tidyverse, polite, scales, ggimage, ggforce, | |
rvest, glue, extrafont, ggrepel, magick) | |
loadfonts() | |
## add_logo function from Thomas Mock | |
add_logo <- function(plot_path, logo_path, logo_position, logo_scale = 10){ | |
# Requires magick R Package https://github.com/ropensci/magick |
library(rgdal)
#> Loading required package: sp
#> rgdal: version: 1.4-3, (SVN revision 828)
#> Geospatial Data Abstraction Library extensions to R successfully loaded
#> Loaded GDAL runtime: GDAL 2.1.3, released 2017/20/01
#> Path to GDAL shared files: /Users/ateucher/Rlibrary/rgdal/gdal
#> GDAL binary built with GEOS: FALSE
#> Loaded PROJ.4 runtime: Rel. 4.9.3, 15 August 2016, [PJ_VERSION: 493]
#> Path to PROJ.4 shared files: /Users/ateucher/Rlibrary/rgdal/proj
library(bcmaps) | |
library(leaflet) | |
library(sf) | |
st_transform(bc_bound(), 4326) %>% | |
leaflet() %>% | |
#add basemap | |
#addpolygons and make it show in three different layers, by risk level | |
addPolygons() %>% | |
addProviderTiles(providers$CartoDB.DarkMatter, |