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
@goldingn
goldingn / parallel_zoon.R
Created October 31, 2017 22:19
example of executing a zoon workflow in parallel (using experimental branch)
# install the experimental parallel branch
# remotes::install_github("zoonproject/zoon@parallel")
library (zoon)
# example workflow for 4 independent models that may take a while to run
run_wf <- function () {
workflow(occurrence = UKAnophelesPlumbeus,
covariate = UKBioclim,
process = Replicate(Background(n = 1000), 4),
model = GBM(max.trees = 10000),
@viciana
viciana / DatosClimaAndalucia.R
Created April 4, 2017 16:30
Ejemplo de descarga de datos climaticos
# require(devtools)
# install_github('SevillaR/Andaclima')
require(Andaclima)
rm(list = ls())
stations <- getAndalusia_ACS()
metainfo <- getMetaData(provincia = stations$province.code,
estacion = stations$station.code ,
@jlehtoma
jlehtoma / wms_proto.R
Created November 13, 2011 20:01
Prototype for accessing WMS from R
# Author: Joona Lehtomäki <joona.lehtomaki@gmail.com>
# Updated: 13.11.2011
# Version: 0.0.1
if (!require("rgdal")) {
install.packages("rgdal")
}
if (!require("raster")) {
install.packages("raster")
@jhollist
jhollist / beamer_two_col.Rmd
Created February 3, 2016 18:51
This .Rmd shows how to use two (or more) columns in a Beamer Presentation from RStudio
---
title: "Untitled"
author: "Jeff W. Hollister"
date: "2/2/2016"
output: beamer_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
install.packages('zoon')
library(zoon)
vignette('Building_a_module')
#############
## Simples ##
#############
#Title: An example of the correlation of x and y for various distributions of (x,y) pairs
#Tags: Mathematics; Statistics; Correlation
#Author: Denis Boigelot
#Packets needed : mvtnorm (rmvnorm), #RSVGTipsDevice (devSVGTips)
#How to use: output()
#
#This is an translated version in R of an Matematica 6 code by Imagecreator.
# from http://en.wikipedia.org/wiki/File:Correlation_examples2.svg
library(mvtnorm)
@sckott
sckott / crossref_alm.md
Created February 24, 2014 17:15
Get alm data for DOIs via Crossref using the alm R package

load alm

library(alm)

Define vector of DOIs, and search

Remember to get your api key, pass it in in the key parameter. Notice that we are passing the base url for the Crossref API, whereas the default is for the PLOS url http://alm.plos.org/api/v3/articles

@benmarwick
benmarwick / docs-per-topic.rmd
Last active August 29, 2015 13:56
How to find the topic with the highest proportion in a set of documents (after a topic model has been generated with the R package mallet)
Which documents belong to each topic?
Documents don't belong to a single topic, there is a distribution of topics
over each document.
But we can Find the topic with the highest proportion for each document.
That top-ranking topic might be called the 'topic' for the document, but note
that all docs have all topics to varying proportions
Assume that we start with `topic_docs` from the output of the mallet package