## Using {biscale} to plot bivariate raster maps
library(ggplot2)
library(biscale)
library(cowplot)
library(raster)
#> Loading required package: sp
This file contains hidden or 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
| # Install R latest version: https://cloud.r-project.org/ | |
| # Install RStudio latest version: https://www.rstudio.com/products/rstudio/download/#download | |
| # Install R packages below: | |
| install.packages("remotes") | |
| install.packages("workflowr") | |
| remotes::install_github("benmarwick/rrtools") |
This file contains hidden or 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(ggplot2) | |
| t <- 1:100 # create time sequence | |
| # warming trend, constant variance | |
| clima <- data.frame(t = t, | |
| temp = rnorm(100, 15 + 0.03*t, sd = 1)) | |
| # warming trend + increasing variance | |
| clima <- data.frame(t = t, |
This file contains hidden or 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
| --- | |
| title: "Having separate reference lists in an Rmarkdown document" | |
| author: "F. Rodriguez-Sanchez" | |
| output: | |
| github_document: | |
| pandoc_args: --lua-filter=multiple-bibliographies.lua | |
| bibliography_main: main.bib | |
| bibliography_suppl: suppl.bib | |
| --- |
This file contains hidden or 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
| https://stackoverflow.com/a/58679929 | |
| See also | |
| http://latex-beamer-class.10966.n7.nabble.com/Hiding-frames-td907.html | |
| https://tex.stackexchange.com/questions/200151/remove-frame-from-presentation | |
| https://tex.stackexchange.com/questions/200151/remove-frame-from-presentation |
This file contains hidden or 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
| diverge0 <- function(p, ramp) { | |
| # p: a trellis object resulting from rasterVis::levelplot | |
| # ramp: the name of an RColorBrewer palette (as character), a character | |
| # vector of colour names to interpolate, or a colorRampPalette. | |
| require(RColorBrewer) | |
| require(rasterVis) | |
| if(length(ramp)==1 && is.character(ramp) && ramp %in% | |
| row.names(brewer.pal.info)) { | |
| ramp <- suppressWarnings(colorRampPalette(brewer.pal(11, ramp))) | |
| } else if(length(ramp) > 1 && is.character(ramp) && all(ramp %in% colors())) { |
This file contains hidden or 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
| ## Working with Sentinel-2 bands in R | |
| # Crear proyecto de RStudio | |
| ## Cargar paquetes necesarios | |
| library(raster) |
This file contains hidden or 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
| ## Working with Sentinel-2 bands in R | |
| ## Primeros pasos | |
| # - Crear proyecto de RStudio | |
| # | |
| # - Guardar capas (ZIP) en la misma carpeta | |
This file contains hidden or 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(ggplot2) | |
| library(cowplot) | |
| library(latex2exp) | |
| #### PALEOTEMPERATURES #### | |
| ## Data from Hansen: http://www.columbia.edu/~jeh1/mailings/2012/20120508_ClimateSensitivity.pdf | |
| ## Available here: http://www.columbia.edu/~mhs119/Sensitivity+SL+CO2/Table.txt |
This file contains hidden or 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(sf) | |
| library(ggspatial) | |
| library(ggthemes) | |
| coast <- rnaturalearth::ne_coastline(scale = "small", returnclass = "sp") | |
| forests <- st_read("data/forestmap/cfc_gen.shp") | |
| forest.redux <- rmapshaper::ms_simplify(forests) | |
| forest.redux.sp <- as(forest.redux, "Spatial") |