Skip to content

Commit

Permalink
In rEEMSplots, add a function eems.posterior.draws to draw and plot…
Browse files Browse the repository at this point in the history
… samples from the posterior.
  • Loading branch information
dipetkov committed Jul 6, 2016
1 parent 55949b5 commit 30a0a65
Show file tree
Hide file tree
Showing 14 changed files with 1,138 additions and 548 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,3 +6,4 @@ output/
*.png
*.so
*.o
.Rproj.user
2 changes: 2 additions & 0 deletions plotting/rEEMSplots/.Rbuildignore
@@ -0,0 +1,2 @@
^.*\.Rproj$
^\.Rproj\.user$
174 changes: 174 additions & 0 deletions plotting/rEEMSplots/.Rhistory
@@ -0,0 +1,174 @@
library(rEEMSplots)
library(rEEMSplots)
library(rEEMSplots)
?eems.voronoi
## Use the provided example or supply the path to your own EEMS run.
eems.results.to.plot = paste(path.package("rEEMSplots"),"/extdata/EEMS-example",sep="")
name.figures.to.save= "EEMS-example-rEEMSplots"
path.expand("~")
?path.expand
path.expand("~/"EEMS-example-rEEMSplots"")
path.expand("~/"EEMS-example-rEEMSplots")
path.expand("~/EEMS-example-rEEMSplots")
## Use the provided example or supply the path to your own EEMS run.
eems.results.to.plot = paste(path.package("rEEMSplots"),"/extdata/EEMS-example",sep="")
name.figures.to.save= "EEMS-example-rEEMSplots"
library(deldir)
## Plot a series of Voronoi diagrams for the EEMS model parameters:
## the effective migration rates (m) and the effective diversity rates (q).
eems.voronoi(mcmcpath = eems.results.to.plot,
plotpath = paste(name.figures.to.save,"-voronoi-diagrams",sep=""),
longlat = TRUE,mcmc.iters = seq(9))
library("rworldmap")
library("rworldxtra")
install.packages("rworldmap")
remove.packages("spam")
install.packages("spam")
?image
?plot
library(spam)
install.packages("rworldmap")
remove.packages("fields")
install.packages("fields")
install.packages("rworldmap")
library("rgdal")
library("rworldmap")
library("rworldxtra")
library("RColorBrewer")
library("deldir")
library(rEEMSplots)
?eems.voronoi
?eems.plots
x = letters
sample(letters, 1)
sample(letters, 1)
sample(letters, 1)
sample(letters, 1)
sample(letters, 1)
sample(letters, 1)
sample(letters, 1)
sample(letters, 1)
sample(letters, 1)
samples(seq(20), 1)
sample(seq(20), 1)
sample(seq(20), 1)
tiles = 1:12
iter = 3
sum(tiles[1:(iter-1)])
sum(tiles[iter:1])
sum(tiles[iter:1][-1])
iter = 1
sum(tiles[iter:1][-1])
sum(tiles[iter:1][-1])
library(rEEMSplots)
library(rEEMSplots)
library(rEEMSplots)
?eems.voronoi
library(rEEMSplots)
?eems.voronoi
eems.results.to.plot = paste0(path.package("rEEMSplots"), "/extdata/EEMS-example", sep = "")
name.figures.to.save = path.expand("~/EEMS-example-rEEMSplots")
library("deldir")
eems.voronoi(mcmcpath = eems.results.to.plot,
plotpath = paste0(name.figures.to.save, "-voronoi-diagrams"),
longlat = TRUE, post.draws = 10)
?bitmap
library(grDevices)
eems.voronoi(mcmcpath = eems.results.to.plot,
plotpath = paste0(name.figures.to.save, "-voronoi-diagrams"),
longlat = TRUE, post.draws = 10)
library(graphics)
eems.voronoi(mcmcpath = eems.results.to.plot,
plotpath = paste0(name.figures.to.save, "-voronoi-diagrams"),
longlat = TRUE, post.draws = 10)
?plot.new
?.filled.contour
library(rEEMSplots)
?mtext
?bitmap
library(rEEMSplots)
library(rEEMSplots)
library(rEEMSplots)
?image
?bitmap
library(rEEMSplots)
?par
?layout
?lcm
library(rEEMSplots)
?devv.off
?dev.off
?col2rgb
library(rEEMSplots)
?eems.voronoi
## Use the provided example or supply the path to your own EEMS run.
eems.results.to.plot = paste0(path.package("rEEMSplots"), "/extdata/EEMS-example", sep = "")
name.figures.to.save = path.expand("~/EEMS-example-rEEMSplots")
library("deldir")
## Plot a series of Voronoi diagrams for the EEMS model parameters:
## the effective migration rates (m) and the effective diversity rates (q).
eems.voronoi(mcmcpath = eems.results.to.plot,
plotpath = paste0(name.figures.to.save, "-voronoi-diagrams"),
longlat = TRUE, post.draws = 10)
library(rEEMSplots)
library(rEEMSplots)
## Use the provided example or supply the path to your own EEMS run.
eems.results.to.plot = paste0(path.package("rEEMSplots"), "/extdata/EEMS-example", sep = "")
name.figures.to.save = path.expand("~/EEMS-example-rEEMSplots")
library("deldir")
## Plot a series of Voronoi diagrams for the EEMS model parameters:
## the effective migration rates (m) and the effective diversity rates (q).
eems.voronoi(mcmcpath = eems.results.to.plot,
plotpath = paste0(name.figures.to.save, "-voronoi-diagrams"),
longlat = TRUE, post.draws = 10)
?eems.popgrid
path.expand("~/EEMS-barrier")
?eems.voronoi
?stopifnot
?nlevels
library(rEEMSplots)
library(rEEMSplots)
library(rEEMSplots)
?random.eems.draws
?eems.posterior.draws
## Use the provided example or supply the path to your own EEMS run.
eems.results.to.plot = paste0(path.package("rEEMSplots"), "/extdata/EEMS-example", sep = "")
name.figures.to.save = path.expand("~/EEMS-example-rEEMSplots")
## Plot a series of Voronoi diagrams for the EEMS model parameters:
## the effective migration rates (m) and the effective diversity rates (q).
eems.posterior.draws(mcmcpath = eems.results.to.plot,
plotpath = paste0(name.figures.to.save, "-posterior-draws"),
longlat = TRUE, post.draws = 10)
library(rEEMSplots)
## Use the provided example or supply the path to your own EEMS run.
eems.results.to.plot = paste0(path.package("rEEMSplots"), "/extdata/EEMS-example", sep = "")
name.figures.to.save = path.expand("~/EEMS-example-rEEMSplots")
## Plot a series of Voronoi diagrams for the EEMS model parameters:
## the effective migration rates (m) and the effective diversity rates (q).
eems.posterior.draws(mcmcpath = eems.results.to.plot,
plotpath = paste0(name.figures.to.save, "-posterior-draws"),
longlat = TRUE, post.draws = 10)
library(rEEMSplots)
library(rEEMSplots)
?eems.voronoi
## Use the provided example or supply the path to your own EEMS run.
eems.results.to.plot = paste0(path.package("rEEMSplots"), "/extdata/EEMS-example", sep = "")
name.figures.to.save = path.expand("~/EEMS-example-rEEMSplots")
library("deldir")
## Plot a series of Voronoi diagrams for the EEMS model parameters:
## the effective migration rates (m) and the effective diversity rates (q).
eems.voronoi(mcmcpath = eems.results.to.plot,
plotpath = paste0(name.figures.to.save, "-voronoi-diagrams"),
longlat = TRUE, post.draws = 10)
library(rEEMSplots)
## Use the provided example or supply the path to your own EEMS run.
eems.results.to.plot = paste0(path.package("rEEMSplots"), "/extdata/EEMS-example", sep = "")
name.figures.to.save = path.expand("~/EEMS-example-rEEMSplots")
library("deldir")
## Plot a series of Voronoi diagrams for the EEMS model parameters:
## the effective migration rates (m) and the effective diversity rates (q).
eems.voronoi(mcmcpath = eems.results.to.plot,
plotpath = paste0(name.figures.to.save, "-voronoi-diagrams"),
longlat = TRUE, post.draws = 10)
?eems.voronoi
q()
26 changes: 24 additions & 2 deletions plotting/rEEMSplots/NAMESPACE
@@ -1,13 +1,35 @@
# Generated by roxygen2: do not edit by hand

export(eems.plots)
export(eems.popgrid)
export(eems.posterior.draws)
export(eems.resid.heatmap)
export(eems.voronoi)
export(eems.popgrid)
import(Rcpp)
import(RcppEigen)
import(geosphere)
import(raster)
import(rgeos)
import(sp)
importFrom(Rcpp,evalCpp)
importFrom(grDevices,bitmap)
importFrom(grDevices,col2rgb)
importFrom(grDevices,colorRampPalette)
importFrom(grDevices,dev.off)
importFrom(grDevices,pdf)
importFrom(graphics,.filled.contour)
importFrom(graphics,Axis)
importFrom(graphics,abline)
importFrom(graphics,axis)
importFrom(graphics,box)
importFrom(graphics,layout)
importFrom(graphics,lcm)
importFrom(graphics,legend)
importFrom(graphics,mtext)
importFrom(graphics,par)
importFrom(graphics,plot.new)
importFrom(graphics,plot.window)
importFrom(graphics,points)
importFrom(graphics,polygon)
importFrom(graphics,rect)
importFrom(graphics,title)
useDynLib(rEEMSplots)
15 changes: 15 additions & 0 deletions plotting/rEEMSplots/R/RcppExports.R
@@ -0,0 +1,15 @@
# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

resistance_distance <- function(M) {
.Call('rEEMSplots_resistance_distance', PACKAGE = 'rEEMSplots', M)
}

rcppstandardize_rates <- function(tiles, rates, seeds, marks, distm) {
.Call('rEEMSplots_rcppstandardize_rates', PACKAGE = 'rEEMSplots', tiles, rates, seeds, marks, distm)
}

rcppdont_standardize_rates <- function(tiles, rates, seeds, marks, distm) {
.Call('rEEMSplots_rcppdont_standardize_rates', PACKAGE = 'rEEMSplots', tiles, rates, seeds, marks, distm)
}

0 comments on commit 30a0a65

Please sign in to comment.