Skip to content

Instantly share code, notes, and snippets.

View whatever's full-sized avatar
🍥
💯

Matt <3 whatever

🍥
💯
  • インターネット総合研究所 (IRL)
  • New York, New York
  • 00:15 (UTC -04:00)
View GitHub Profile
@whatever
whatever / gist:5005564
Created February 21, 2013 15:41
ERROR-SU
[02/20 20:22:17 EST] info: transport end (undefined)
[02/20 20:22:17 EST] debug: set close timeout for client AyFDdcWmLPRwzozSUGEv
[02/20 20:22:17 EST] debug: cleared close timeout for client AyFDdcWmLPRwzozSUGEv
[02/20 20:22:17 EST] debug: cleared heartbeat interval for client AyFDdcWmLPRwzozSUGEv
[02/20 20:22:17 EST] debug: discarding transport
[02/20 20:23:35 EST] debug: client authorized
[02/20 20:23:35 EST] info: handshake authorized pWWBZoxsA4GjSzYkUGEw
[02/20 20:23:35 EST] debug: setting request GET /socket.io/1/websocket/pWWBZoxsA4GjSzYkUGEw
[02/20 20:23:35 EST] debug: set heartbeat interval for client pWWBZoxsA4GjSzYkUGEw
[02/20 20:23:35 EST] debug: websocket writing 7:::1+0
@whatever
whatever / divide-Zelig-example.R
Created January 11, 2013 16:29
Example of using divide.R with Zelig
library(Zelig)
# Divide a Data Frame or Matrix Into Subsets
# @param obj a data.frame or matrix to be split into subsets, divided by the
# categorical variable
# @param by a character-string, specifying the column to subset
# @return a list, containing the subsetted data sets. The names of the list
# correspond to the value of the subsetted list
divide <- function (obj, by) {
# Get the set of possible values
@whatever
whatever / divide.R
Created January 11, 2013 16:26
Function to divide a data.frame by unique values of a column
# Divide a Data Frame or Matrix Into Subsets
# @param obj a data.frame or matrix to be split into subsets, divided by the
# categorical variable
# @param by a character-string, specifying the column to subset
# @return a list, containing the subsetted data sets. The names of the list
# correspond to the value of the subsetted list
divide <- function (obj, by) {
# Get the set of possible values
column.levels <-if (is.factor(obj[, by])) {
levels(obj[, by])
# Divide a Data Frame or Matrix Into Subsets
# @param obj a data.frame or matrix to be split into subsets, divided by the
# categorical variable
# @param by a character-string, specifying the column to subset
# @return a list, containing the subsetted data sets. The names of the list
# correspond to the value of the subsetted list
divide <- function (obj, by) {
# Get the set of possible values
column.levels <-if (is.factor(obj[, by]))
levels(obj[, by])