Code: https://github.com/Aariq/website-quarto/blob/main/publications.qmd
Web page: https://ericrscott.com/publications
## from: https://logfc.wordpress.com/2017/03/15/adding-figure-labels-a-b-c-in-the-top-left-corner-of-the-plotting-region/ | |
fig_label <- function(text, region="figure", pos="topleft", cex=NULL, ...) { | |
region <- match.arg(region, c("figure", "plot", "device")) | |
pos <- match.arg(pos, c("topleft", "top", "topright", | |
"left", "center", "right", | |
"bottomleft", "bottom", "bottomright")) | |
if(region %in% c("figure", "device")) { |
Git and GitHub (Hadley Wickham): http://r-pkgs.had.co.nz/git.html
R development using GitHub (Gabor Csardi): https://github.com/MangoTheCat/github-workshop
Working with RStudio, Git, GitHub (STAT 545): http://stat545-ubc.github.io/git00_index.html
Version control with git (R. Fitzjohn): http://nicercode.github.io/2014-02-13-UNSW/lessons/70-version-control/
Version control with Git (Software Carpentry): http://software-carpentry.org/v5/novice/git/index.html
--- | |
title: "Untitled" | |
author: "Francisco Rodriguez-Sanchez" | |
date: "Thursday, January 22, 2015" | |
output: html_document | |
--- | |
<style type="text/css"> | |
body, td { |
library(usethis) | |
create_package("templateRpackage") | |
## Use git & create repo on GitHub | |
use_git() | |
use_github(organisation = "EcologyR") | |
## Create README |
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/ | |
# 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 |
## Spatial reference systems I often use | |
## Source this gist from R: | |
# source("https://gist.githubusercontent.com/Pakillo/23212b72a02b9d524073/raw/b73b28354f61d381b5614a2254cf128b93e11c8a/projections.R") | |
# or using devtools: | |
# devtools::source_gist("https://gist.github.com/Pakillo/23212b72a02b9d524073") | |
# EPSG codes: | |
geo <- 4326 # Geographic, datum WGS84 | |
laea.etrs89 <- 3035 # Lambert Azimuthal Equal Area - ETRS89 |