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("shiny") | |
library("shinyjs") | |
ui <- shinyUI(pageWithSidebar( | |
titlePanel("", "3D Perspective Plot for Interaction Effects"), | |
sidebarPanel( | |
tabsetPanel( | |
tabPanel("Data", |
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
# setup | |
library("survey") | |
data("api") | |
apiclus1$proportion <- apiclus1$pcttest/100 | |
dclus1<-svydesign(id=~dnum, fpc=~fpc, data=apiclus1) | |
# confint(svymean(...) == svyciprop(..., method = "me") | |
confint(svymean(~ proportion, dclus1)) | |
## 2.5 % 97.5 % | |
## proportion 0.9852196 0.9943432 |
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
# Outline for building R from source on Windows (7) | |
# http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Building-from-source | |
# Pre-built Windows R-Devel binary: http://cran.r-project.org/bin/windows/base/rdevel.html | |
# possibly helpful: http://stackoverflow.com/questions/25451705/build-r-source-code-from-windows | |
# install Rtools | |
# http://cran.r-project.org/bin/windows/Rtools/ | |
# install Inno Setup (Unicode version) |
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
stata_summary <- | |
function( | |
x, | |
... | |
) { | |
# summarize | |
mod <- x | |
x <- summary(x) | |
# find outcome variable |
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
# ttable: a grammar of tables | |
# https://gist.github.com/leeper/f9cfbe6bd185763762e126a4d8d7c286 | |
# aggregate/summarize | |
# arrange | |
# annotation (metadata features) | |
# theme |
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('devtools') | |
library('utils') | |
library('httr') | |
update_github <- | |
function(ask = TRUE, ...){ | |
installed <- installed.packages() | |
oldVersion <- installed[,'Version'] | |
urls <- sapply(names(oldVersion), function(x){ | |
d <- packageDescription(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
# push | |
push <- function(x, values) (assign(as.character(substitute(x)), c(x, values), parent.frame())) | |
# pop | |
pop <- function(x) (assign(as.character(substitute(x)), x[-length(x)], parent.frame())) | |
# example | |
z <- 1:3 | |
push(z, 4) | |
z |
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
# Google DMCA Transparency Data | |
# 2014-07-24 | |
# https://www.google.com/transparencyreport/removals/copyright/data/ | |
# get the data | |
download.file('http://transparencyreport.storage.googleapis.com/google-websearch-copyright-removals.zip', | |
'localcopy.zip', method = 'curl') | |
unzip('localcopy.zip', files = 'google-websearch-copyright-removals/requests.csv') |
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
# Copyright (c) 2018 Thomas J. Leeper | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all |
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
thing,chocolatey_name | |
Adobe Reader,adobereader | |
ccleaner,ccleaner | |
chocolatey, | |
Chrome,google-chrome-x64 | |
ConEmu,conemu | |
curl,curl | |
cutepdf,cutepdf | |
Dropbox,dropbox | |
gettext, |
NewerOlder