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(scam) | |
| library(rstan) | |
| library(ggplot2) | |
| set.seed(0) | |
| n <- 200 | |
| x1 <- runif(n)*6-3 | |
| f1 <- 3*exp(-x1^2) # unconstrained term | |
| f1 <- (f1-min(f1))/(max(f1)-min(f1)) # function scaled to have range [0,1] | |
| x2 <- runif(n)*4-1; |
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
| devtools::install_github("mrc-ide/hivmappr@shiny") | |
| ## 1. Bundle app using `rsconnect` internals. | |
| appDir <- "~/Documents/Code/R/hivmappr/inst/shiny/hivmappr/" | |
| appPath <- appDir | |
| target <- rsconnect:::deploymentTarget(appPath, | |
| appName = NULL, |
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
| #' --- | |
| #' title: "<title>" | |
| #' author: Jeff Eaton | |
| #' output: pdf_document | |
| #' --- | |
| #' | |
| ##+ setup, include=FALSE | |
| library(knitr) | |
| opts_chunk$set(tidy=TRUE, warning=FALSE, cache=TRUE, message=FALSE) |
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
| read_zipdta <- function(zfile){ | |
| tmp <- tempfile() | |
| on.exit(unlink(tmp)) | |
| return(foreign::read.dta(unzip(zfile, grep(".dta", unzip(zfile, list=TRUE)$Name, TRUE, value=TRUE), exdir=tmp))) | |
| } |
NewerOlder