Skip to content

Instantly share code, notes, and snippets.

Francisco Rodriguez-Sanchez Pakillo

Block or report user

Report or block Pakillo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Sentinel2-repaso.R
## Working with Sentinel-2 bands in R
# Crear proyecto de RStudio
## Cargar paquetes necesarios
library(raster)
View Sentinel2-intro.R
## Working with Sentinel-2 bands in R
## Primeros pasos
# - Crear proyecto de RStudio
#
# - Guardar capas (ZIP) en la misma carpeta
@Pakillo
Pakillo / word-character-count-Rstudio.md
Last active Jul 31, 2019
Count words and characters in Rstudio
View word-character-count-Rstudio.md

As far as I know Rstudio does not count words or characters at the moment, which would be useful particularly when writing Rmarkdown.

This is a quick shortcut using word_count and character_count functions from qdap package. See below for two wrapper functions that simplify their use.

library("qdap")

Just select and copy the text to the clipboard and then run in the console:

@Pakillo
Pakillo / git-github-tutorials.md
Last active Jul 25, 2019
Git & GitHub tutorials
View git-github-tutorials.md
@Pakillo
Pakillo / Rmarkdown-fontsize.Rmd
Created Jan 22, 2015
Changing font sizes of HTML ouput in Rmarkdown
View Rmarkdown-fontsize.Rmd
---
title: "Untitled"
author: "Francisco Rodriguez-Sanchez"
date: "Thursday, January 22, 2015"
output: html_document
---
<style type="text/css">
body, td {
View polygonizer.R
polygonizer <- function(x, outshape=NULL, gdalformat = 'ESRI Shapefile',
pypath=NULL, readpoly=TRUE, quietish=TRUE) {
# x: an R Raster layer, or the file path to a raster file recognised by GDAL
# outshape: the path to the output shapefile (if NULL, a temporary file will be created)
# gdalformat: the desired OGR vector format
# pypath: the path to gdal_polygonize.py (if NULL, an attempt will be made to determine the location
# readpoly: should the polygon shapefile be read back into R, and returned by this function? (logical)
# quietish: should (some) messages be suppressed? (logical)
if (isTRUE(readpoly)) require(rgdal)
if (is.null(pypath)) {
View base_r_plotting_tutorial_koontz_d-rug.r
### Title: Back to basics: High quality plots using base R graphics
### An interactive tutorial for the Davis R Users Group meeting on April 24, 2015
###
### Date created: 20150418
### Last updated: 20150423
###
### Author: Michael Koontz
### Email: mikoontz@gmail.com
### Twitter: @michaeljkoontz
###
@Pakillo
Pakillo / themes.R
Last active Sep 6, 2018
ggplot_themes
View themes.R
### My favourite ggplot2 themes, always accessible ###
## just source this gist from any project ##
#####################################################################################
# Noam's default ggplot2 styling #####
# Source: https://github.com/noamross/noamtools/blob/master/R/theme_nr.R
theme_nr <-theme(text=element_text(family="Helvetica", size=14),
panel.grid.major.x=element_blank(),
You can’t perform that action at this time.