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) { | |
output$main_plot <- renderPlot(width = 400, height = 300, { | |
hist(faithful$eruptions, | |
probability = TRUE, | |
breaks = as.numeric(input$n_breaks), | |
xlab = "Duration (minutes)", | |
main = "Geyser eruption duration") |
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
sex | ageYear | ageMonth | heightIn | weightLb | |
---|---|---|---|---|---|
f | 11.91667 | 143 | 56.3 | 85 | |
f | 12.91667 | 155 | 62.3 | 105 | |
f | 12.75 | 153 | 63.3 | 108 | |
f | 13.41667 | 161 | 59 | 92 | |
f | 15.91667 | 191 | 62.5 | 112.5 | |
f | 14.25 | 171 | 62.5 | 112 | |
f | 15.41667 | 185 | 59 | 104 | |
f | 11.83333 | 142 | 56.5 | 69 | |
f | 13.33333 | 160 | 62 | 94.5 |
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) { | |
output$distPlot <- renderPlot({ | |
# Take a dependency on input$goButton | |
input$goButton | |
# Use isolate() to avoid dependency on input$obs | |
dist <- isolate(rnorm(input$obs)) | |
hist(dist) | |
}) | |
}) |
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
clear | |
set obs 4000 | |
gen id = _n | |
gen eta1 = rnormal() | |
gen eta2 = rnormal() | |
* Generate 5 irrelevant factors that might affect each of the |
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
lmOut <- function(res, file="test.csv", ndigit=3, writecsv=T) { | |
# If summary has not been run on the model then run summary | |
if (length(grep("summary", class(res)))==0) res <- summary(res) | |
co <- res$coefficients | |
nvar <- nrow(co) | |
ncol <- ncol(co) | |
f <- res$fstatistic | |
formatter <- function(x) format(round(x,ndigit),nsmall=ndigit) | |
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
# R - Doodling in R | |
# I am working on creating some functions that will be capable of creating shapes and plots that look hand drawn. | |
# I have made some progress in this goal. | |
# In that process I have also discovered that I can make some doodles that look hand drawn as well. | |
# In order to accomplish the goal of simulating hand drawing I want to simulate the momentum of hand writing. |
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
####### Excel summary exporter ####### | |
## Modified from Smart, Francis ## | |
## Jean P. Gibert, 2014 ## | |
lmOut <- function(res, file="test.csv", ndigit=3, writecsv=T) { | |
# If summary has not been run on the model then run summary | |
if (length(grep("summary", class(res)))==0) res <- summary(res) | |
co <- res$coefficients | |
nvar <- nrow(co) | |
ncoll <- ncol(co) |
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
_grmedf,_gstd01,actest,addest,addtxt,adjust,adodev,adoedit,adolist,adoupdate,aipe,akdensity,allpossible,alt,amcmc,an16_1,anovacontrast,anovalator,apc,apcd,apch,areastack,arimafit,array,art,ashell,atkplot,atsinst,attrib,avplot3,backrasch,backup,bayesmlogit,bcii,bcoeff,betafit,betaprior,bic,bicdrop1,binary_mediation,bincoverage,biplotvlab,birthsim,blist,blogit2,bmjcip,bpmedian,bronch,bs4rw,bspline,bstut,bsweights,bugsdat,bxmodel,bygap,bynote,bys,bystore,byvar,calibest,canred,catdev,catenate,cb2html,ccinter,cctable,cellgr,cem,cf2,chardef,charlist,charlson,checkrob,checkvar,chidemo,china_map,china_spatdwm,ci_marg_mu,cidemo,cidemo2,cij,circular,cistat,ciw,ckvar,clarify,cleanchars,cleanlog,clrbound,clstop_lbt,clt,clustpop,clustsens,cmp,cns,cnsrsig,codci,codebook2,coefplot,cohend,collapse2,collapseunique,collin,colortrans,compado,conddens,condivreg,confirmdir,contrast,copypkg,coranal,cordemo,corrsq,corrtex,cpr,cprplots,cqiv,crib10,crib11,crib12,crib13,crib9,csgof,csinter,csjl,cstable,csvconvert,cureregr,datelist,de2 |
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
<NotepadPlus> | |
<UserLang name="Julia" ext="jl"> | |
<Settings> | |
<Global caseIgnored="no" /> | |
<TreatAsSymbol comment="no" commentLine="yes" /> | |
<Prefix words1="no" words2="no" words3="no" words4="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Delimiters">"00"00</Keywords> | |
<Keywords name="Folder+">begin function type for while if</Keywords> |
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
require(plyr) | |
require(ggplot2) | |
require(scales) | |
# Download data from: | |
# http://www.ssa.gov/oact/babynames/names.zip | |
setwd("C:/Data/SS-names/") | |
files<-list.files() | |
files<-files[grepl(".txt",files)] |
OlderNewer