View plots-for-postpi.R
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
library(hextri) | |
library(tidyr) | |
noco = readRDS("/cloud/project/postpi/noco.rds") | |
truth = readRDS("/cloud/project/postpi/truth.rds") | |
par = readRDS("/cloud/project/postpi/par_postpi.rds") | |
nonpar = readRDS("/cloud/project/postpi/nonpar_postpi.rds") | |
nbins = 20 |
View simple-example.R
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
### Let's simulate some data very simply | |
## Load libraries | |
library(ggplot2) | |
library(dplyr) | |
library(gam) | |
library(patchwork) | |
# Set parameters | |
n_sample = 100 |
View nhanes-flexdashboard.Rmd
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
--- | |
title: "How does your BMI measure up?" | |
output: flexdashboard::flex_dashboard | |
runtime: shiny | |
--- | |
Inputs {.sidebar} | |
------------------------------------- | |
```{r} |
View close.Rmd
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
--- | |
title: "Tabset Column" | |
runtime: shiny | |
output: flexdashboard::flex_dashboard | |
--- | |
```{r setup, include=FALSE} | |
library(flexdashboard) |
View plot_net.R
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
#library(ggnet) | |
#library(RkittleBrewer) | |
#library(network) | |
plot_net = function(nodes_per_layer, | |
layer_shape, | |
connection_type, | |
stride_length, | |
layer_color, | |
node_values, |
View forsean.R
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
plot_net = function(nodes_per_layer, layer_shape, connection_type, stride_length){ | |
total_nodes = sum(nodes_per_layer) | |
adjacency = matrix(0,nrow=total_nodes,ncol=total_nodes) | |
for(i in seq_along(connection_type)){ | |
source_nodes = 1:nodes_per_layer[i] + (i-1 > 0)*sum(nodes_per_layer[1:(i-1)]) | |
sink_nodes = 1:nodes_per_layer[(i+1)] + (i > 0)*sum(nodes_per_layer[1:i]) | |
nsource = length(source_nodes) |
View jhudsl.R
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
library(png) | |
library(ggforce) | |
library(animation) | |
library(tweenr) | |
jhu_png = readPNG("jhudsl.png") | |
x = rep(1:510,each=555) | |
y = rep(1:555,510) | |
val = jhu_png[,,3] | |
val = round(val) |
View dumb-resid
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
f1 = formula(log(cost) ~ date) | |
lm1 = lm(f1,data=nuclear) | |
stat = lm1$coeff[2] | |
resid = lm1$residuals | |
fit = lm1$fitted.values | |
n = dim(nuclear)[1] | |
B = 500 | |
stat0 = rep(0,B) |
View tday.delim
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
col1 col3 col2 | |
t h a | |
n k s | |
g i v | |
i n g |
View puzzlehard_nov25_2015.delim
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
col3 col2 col4 col1 | |
h b t t | |
i w i g | |
k t g n | |
n h n i |
NewerOlder