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
SiteName Year Restoration Reference ObserverNames Precipitation Temperature | |
IGH 2005 3 3 Tyler_Amanda 0 48 | |
Kelly 2005 4 2 Patrick_Chelsea 0 48 | |
Carlton 2005 2 3 David_Megan 0 48 | |
IGH 2006 9 6 Tyler_Amanda 0 52 | |
Kelly 2006 9 1 David_Megan 0 52 | |
Carlton 2006 7 3 Patrick_Chelsea 0 52 | |
IGH 2007 12 7 David_Megan 12 41 | |
Kelly 2007 2 18 Jeremy_Lucy 12 41 | |
Carlton 2007 11 2 Patrick_Chelsea 12 41 |
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
column.int<-function(int.fun='dnorm(x)',num.poly=20,from.x=-1.96,to.x=1.96,plot.cum=F){ | |
if (!require(ggplot2) | !require(scales) | !require(gridExtra)) { | |
stop("This app requires the ggplot2, scales, and gridExtra packages. To install, run 'install.packages(\"name\")'.\n") | |
} | |
if(from.x>to.x) stop('Starting x must be less than ending x') | |
if(is.character(int.fun)) int.fun<-eval(parse(text=paste('function(x)',int.fun))) | |
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
if (!require(ggplot2) | !require(scales) | !require(gridExtra) | !require(shiny)) { | |
stop("This app requires the shiny, ggplot2, scales, and gridExtra packages. To install, run 'install.packages(\"name\")'.\n") | |
} | |
# Define server logic required to generate and plot a random distribution | |
shinyServer(function(input, output) { | |
output$intPlot <- renderPlot({ | |
require(ggplot2) | |
require(scales) |
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
mc.int.ex<-function(x.range=c(-3,3),int=c(-1.96,1.96),n=10000,plot=T, | |
plot.pts=T,plot.poly=T,cols=list('black','green','blue'),round.val=2,val=F){ | |
require(scales) | |
#create data for model fit | |
x.fit<-seq(x.range[1],x.range[2],length=n) | |
y.fit<-dnorm(x.fit) | |
dat.fit<-data.frame(x.fit,y.fit) | |
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
mc.int<-function(mod.in,int=NULL,n=10000,int.base=0,plot=T,plot.pts=T, | |
plot.poly=T,cols=list('black','green','blue'),round.val=2,val=F){ | |
require(scales) | |
#variable names from model | |
if(is.null(mod.in$call$formula)){ | |
x.names<-colnames(eval(mod.in$call$x)) | |
y.names<-colnames(eval(mod.in$call$y)) | |
x.range<-range(eval(mod.in$call$x)) |
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.qual<-function(x,x.locs=c(0.01,0.99),y.locs=c(0,1),steps=NULL,sp.names=NULL,dt.tx=T,rsc=T, | |
ln.st=NULL,rs.ln=c(3,15),ln.cl='RdYlGn',alpha=0.7,leg=T,rnks=FALSE,...){ | |
require(RColorBrewer) | |
require(scales) | |
if(length(x.locs) != 2 | length(y.locs) != 2) | |
stop('x and y dimensions must be two-element vectors') | |
if(x.locs[1]<0 | x.locs[2]>1 | y.locs[1]<0 | y.locs[2]>1) |
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
obs<-100 | |
x<-runif(obs,0,100) | |
y<-x^2+rnorm(obs,0,800) | |
require(scales) | |
#examples with span | |
par(mfrow=c(2,2),mar=c(4,4,0.5,0.5),family='serif') | |
span<-round(seq(0.5,0.1,length=4),2) | |
for(i in span){ |
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
shinyServer(function(input, output) { | |
myData <- reactive({ | |
read.csv(input$file$datapath) | |
}) | |
output$summary <- renderPrint({ | |
if (is.null(input$file)) { | |
return(cat('File not uploaded')) |
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.nnet<-function(mod.in,nid=T,all.out=T,all.in=T,wts.only=F,rel.rsc=5,circle.cex=5,node.labs=T, | |
line.stag=NULL,cex.val=1,alpha.val=1,circle.col='lightgrey',pos.col='black',neg.col='grey',...){ | |
require(scales) | |
#gets weights for neural network, output is list | |
#if rescaled argument is true, weights are returned but rescaled based on abs value | |
nnet.vals<-function(mod.in,nid,rel.rsc){ | |
library(scales) |
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
catch.fun.v2<-function(dows,trace=T,rich.out=F){ | |
require(XML) | |
strt<-Sys.time() | |
#create object for output | |
fish.out<-vector('list',length(dows)) | |
names(fish.out)<-dows | |