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
@Pakillo
Pakillo / plotless.R
Last active March 4, 2026 09:18
Plotless density estimation (ecology)
``` r
## Simula 200 distancias
set.seed(123)
distancias <- runif(n = 200, min = 0.1, max = 10)
mean(distancias)
#> [1] 5.11328
## Muestrea sólo 20 puntos
di <- sample(distancias, size = 20)
@Pakillo
Pakillo / release_bullets.R
Created September 3, 2025 13:13
Add release_bullets() to usethis::use_release_issue()
release_bullets <- function() {
c(
"Run `goodpractice::gp()`",
"Run `extrachecks::extrachecks()` from https://github.com/JosiahParry/extrachecks"
"`devtools::release()`"
)
}
@Pakillo
Pakillo / Rmarkdown-fontsize.Rmd
Created January 22, 2015 22:32
Changing font sizes of HTML ouput in Rmarkdown
---
title: "Untitled"
author: "Francisco Rodriguez-Sanchez"
date: "Thursday, January 22, 2015"
output: html_document
---
<style type="text/css">
body, td {
@Pakillo
Pakillo / quicktopomap.R
Created January 8, 2014 10:24
Creating quick topographical map in R
library(dismo)
# Get elevation data from the internet for specified coordinates
elev <- getData("SRTM", download=T, lon=-76.6, lat=18.1)
# Specify desired extent
ext <- c(-76.68, -76.65, 18.08, 18.11)
ext2 <- c(-76.675, -76.655, 18.088, 18.10) # for plotting
@Pakillo
Pakillo / fig_label.R
Created April 10, 2017 17:03
R function to draw figure labels in base plots
## 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")) {
@Pakillo
Pakillo / git-github-tutorials.md
Last active July 8, 2023 13:51
Git & GitHub tutorials
library(usethis)
create_package("templateRpackage")
## Use git & create repo on GitHub
use_git()
use_github(organisation = "EcologyR")
## Create README