This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### ggplot MCMC posteriors and priors by scenario, parameter and replicas ### | |
### Author : Facundo Muñoz ([email protected]) | |
### Licence: GPL-3 | |
### Date : 2014-09-10 | |
### Required packages | |
library(rlist) # data-manipulation | |
library(plyr) | |
library(reshape2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This procedure allows to plot blocks borders | |
# over some spatially-arranged variable | |
# Data is assumed to be on a regular grid | |
# The dataset contains row and column coordinates | |
# a numerical variable indicating the block number of the current cell | |
# and the numerical variable to be plotted | |
# Requirements: | |
# either package rgeos, which depends on [GEOS](http://trac.osgeo.org/geos/) (GEometry Open Source) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
# Some fake points | |
N <- 500 | |
loc <- matrix(runif(2*N), ncol=2) | |
# A regular (not necessarily square) grid | |
n.row <- 10 | |
n.col <- 10 | |
xrange <- range(loc[,1]) |
NewerOlder