https://github.com/rtyley/bfg-repo-cleaner
https://github.com/newren/git-filter-repo/
https://github.com/mpadge/dotfiles/blob/main/system/git-big-script.bash
library(usethis) | |
create_package("templateRpackage") | |
## Use git & create repo on GitHub | |
use_git() | |
use_github(organisation = "EcologyR") | |
## Create README |
# 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("rmarkdown") | |
install.packages("rticles") | |
# remotes::install_github("Pakillo/rmdTemplates") # optional |
library(sf) | |
library(terra) | |
## Define area | |
coords <- data.frame(x = c(-5.5, -5.5, -5.3, -5.3), | |
y = c(36.7, 36.8, 36.7, 36.8)) | |
coords.sf <- st_as_sf(coords, coords = c("x", "y"), crs = 4326) | |
## Download elevation data |
# Install R latest version: https://cloud.r-project.org/ | |
# For installing R on Linux, check out https://docs.rstudio.com/resources/install-r/ | |
# Instructions: https://moderndive.netlify.app/1-getting-started.html | |
# Install RStudio latest version: https://www.rstudio.com/products/rstudio/download/#download | |
# Open RStudio and install some R packages using the code below: | |
install.packages(c( | |
"tidyverse", |
# 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(c( | |
"rmarkdown", | |
"knitr", | |
"dplyr", |
## Using {biscale} to plot bivariate raster maps
library(ggplot2)
library(biscale)
library(cowplot)
library(raster)
#> Loading required package: sp
# 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") |
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, |