Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In rEEMSplots, add a function
eems.posterior.draws
to draw and plot…
… samples from the posterior.
- Loading branch information
Showing
14 changed files
with
1,138 additions
and
548 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ output/ | |
*.png | ||
*.so | ||
*.o | ||
.Rproj.user |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} | ||
|
Oops, something went wrong.