The function VarCorrCI
takes a merMod
object and returns variance components and 95% confidence intervals.
Modified from: http://rpubs.com/bbolker/varwald and various other places.
library(lme4)
The function VarCorrCI
takes a merMod
object and returns variance components and 95% confidence intervals.
Modified from: http://rpubs.com/bbolker/varwald and various other places.
library(lme4)
--- | |
title: "Visualizing the Clinton Email Network in R" | |
author: "hrbrmstr" | |
date: "`r Sys.Date()`" | |
output: html_document | |
--- | |
```{r include=FALSE} | |
knitr::opts_chunk$set( | |
collapse=TRUE, | |
comment="#>", |
library(shiny) | |
# Example usage: | |
# lmGadget(mtcars, "wt", "mpg") | |
# | |
# Returns a list with two items: | |
# $data: Data with excluded rows removed. | |
# $model: lm (model) object. | |
lmGadget <- function(data, xvar, yvar) { | |
library(miniUI) |
### An example of building a TensorFlow model from R using rPython ### | |
# For this script you need to | |
# 1. Have python 2.7 installed. | |
# 2. Install the rPython package in R. | |
# 3. Install Google's TensorFlow library as per these instructions: | |
# http://www.tensorflow.org/get_started/os_setup.md#binary_installation | |
### Here is how to setup and run a trivial TensorFlow model ### | |
# Load TensorFlow (I couldn't get this to work without setting sys.argv... ) |
#!/usr/bin/Rscript --vanilla | |
########################################################### | |
## ## | |
## elastic.R ## | |
## ## | |
## Author: Tony Fischetti ## | |
## [email protected] ## | |
## ## | |
########################################################### |
Install s3fs on Mac OS X | |
1 - Install Homebrew - http://brew.sh/ | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
2 - Use Homebrew to install s3fs + dependencies | |
brew install s3fs | |
3 - Do some custom stuff. I only used the first step from here -> https://gist.github.com/fukayatsu/3910097 | |
sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions |
MIT License
Copyright (c) [year] [fullname]
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:
# Load the MNIST digit recognition dataset into R | |
# http://yann.lecun.com/exdb/mnist/ | |
# assume you have all 4 files and gunzip'd them | |
# creates train$n, train$x, train$y and test$n, test$x, test$y | |
# e.g. train$x is a 60000 x 784 matrix, each row is one digit (28x28) | |
# call: show_digit(train$x[5,]) to see a digit. | |
# brendan o'connor - gist.github.com/39760 - anyall.org | |
load_mnist <- function() { | |
load_image_file <- function(filename) { |