Francisco Rodriguez-Sanchez 2017-05-16
library(knitr)
opts_chunk$set(cache = TRUE, message = FALSE)
library(raster)| ## from: https://logfc.wordpress.com/2017/03/15/adding-figure-labels-a-b-c-in-the-top-left-corner-of-the-plotting-region/ | |
| fig_label <- function(text, region="figure", pos="topleft", cex=NULL, ...) { | |
| region <- match.arg(region, c("figure", "plot", "device")) | |
| pos <- match.arg(pos, c("topleft", "top", "topright", | |
| "left", "center", "right", | |
| "bottomleft", "bottom", "bottomright")) | |
| if(region %in% c("figure", "device")) { |
| `simulate.gamm` <- function(object, nsim = 1, seed = NULL, newdata, | |
| freq = FALSE, unconditional = FALSE, ...) { | |
| if (!exists(".Random.seed", envir = .GlobalEnv, inherits = FALSE)) | |
| runif(1) | |
| if (is.null(seed)) | |
| RNGstate <- get(".Random.seed", envir = .GlobalEnv) | |
| else { | |
| R.seed <- get(".Random.seed", envir = .GlobalEnv) | |
| set.seed(seed) | |
| RNGstate <- structure(seed, kind = as.list(RNGkind())) |
| library("shiny") | |
| library("shinyjs") | |
| ui <- shinyUI(pageWithSidebar( | |
| titlePanel("", "3D Perspective Plot for Interaction Effects"), | |
| sidebarPanel( | |
| tabsetPanel( | |
| tabPanel("Data", |
| --- | |
| title: "Untitled" | |
| author: "Jeff W. Hollister" | |
| date: "2/2/2016" | |
| output: beamer_presentation | |
| --- | |
| ```{r setup, include=FALSE} | |
| knitr::opts_chunk$set(echo = FALSE) |
| - https://mvuorre.github.io/r/ggplot2-visualizing-prior-posterior/ | |
| - https://users.soe.ucsc.edu/~draper/beta-distributions-r.txt | |
| - http://shinyapps.org/apps/RGraphCompendium/index.php#prior-and-posterior | |
| - https://alexanderetz.com/2015/07/25/understanding-bayes-updating-priors-via-the-likelihood/ | |
| - http://doingbayesiandataanalysis.blogspot.com.es/2015/10/posterior-predicted-distribution-for.html | |
| - http://www.stat.cmu.edu/~hseltman/rube/rubeManual.pdf | |
| - http://stackoverflow.com/questions/19476744/how-to-plot-bayesian-prior-and-posterior-distributions-in-one-panel-using-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(), |
Francisco Rodriguez-Sanchez
22 April 2016
Trying new RFc package to get climate data into R from FetchClimate service.
See all the available climate variables here.