Skip to content

Instantly share code, notes, and snippets.

View Pakillo's full-sized avatar
🌳
Living the dream

Francisco Rodriguez-Sanchez Pakillo

🌳
Living the dream
View GitHub Profile
library(usethis)
create_package("templateRpackage")
## Use git & create repo on GitHub
use_git()
use_github(organisation = "EcologyR")
## Create README
@Pakillo
Pakillo / install.R
Last active May 16, 2022 14:14
Festival AEET - Taller Ciencia Reproducible - PREPARATIVOS
# 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
@Pakillo
Pakillo / relief_maps_rspatial.R
Last active July 22, 2022 15:59
Quick elevation maps with R
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",
@Pakillo
Pakillo / GLM_course_install.R
Last active August 26, 2021 15:22
GLM course: packages to install
# 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",
@Pakillo
Pakillo / biscale_raster_map.md
Last active July 21, 2021 08:15
Using {biscale} package to plot bivariate raster maps in R
## Using {biscale} to plot bivariate raster maps

library(ggplot2)
library(biscale)
library(cowplot)
library(raster)
#> Loading required package: sp
@Pakillo
Pakillo / install.R
Last active June 7, 2021 10:14
BLIZ Summer School - software & R packages to install
# 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")
@Pakillo
Pakillo / tiempo_vs_clima.R
Created January 11, 2021 20:23
Tiempo vs Clima - Weather vs Climate
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,