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
# shortform git commands | |
alias g='git' | |
# Get a list of all TODO/FIXME tasks left to be done in your project | |
alias tasks='grep --exclude-dir=.git -rEI "TODO|FIXME" . 2>/dev/null' | |
# edit your gitignore from anywhere in your repo | |
vim $(git rev-parse --show-toplevel)/.gitignore | |
# simple single-lined git log |
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
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<script src='//ramnathv.github.io/rCharts/libraries/widgets/polycharts/js/polychart2.standalone.js' type='text/javascript'></script> | |
<style> | |
.rChart { | |
display: block; |
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
http://www.urbpoidzbi.com | |
http://www.muqvfhccdi.com | |
http://www.fkvewqboqk.com | |
http://www.ahyeiigjrf.com | |
http://www.bmrvmrppne.com | |
http://www.hebadssdwf.com | |
http://www.ppklogqhbc.com | |
http://www.xtzxvxldpe.com | |
http://www.jgelngzvni.com | |
http://www.bvwedfcbfa.com |
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
.main-container { | |
max-width: 1000px !important; | |
} |
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
It's not uncommon where I'm working to get some dataset with a needlessly longass name and needlessly longass field names. | |
Unfortunately, they want the field names and dataset names left as is, in situ. | |
Is there something like %>% for single-line stuff that would do this: | |
Instead of... | |
omgthisdatasetnameissolong$whythehelldidtheynamethisfieldlikethis <- as.character(omgthisdatasetnameissolong$whythehelldidtheynamethisfieldlikethis) | |
maybe this... |
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(RODBC) | |
library(RODBCext) | |
dbconn <- odbcConnect(dsn = "dbname", uid = "me", pwd = "password") | |
query <- "select * from table where blah = 'blahblahblah' and blah2 = ?" | |
results <- function(x){ | |
sqlExecute(dbconn, query, x) | |
sqlGetResults(dbconn) | |
} |
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
--- | |
title: "Testing1" | |
author: "JCW" | |
date: "November 19, 2015" | |
output: | |
html_document: | |
highlight: haddock | |
theme: cosmo | |
--- |
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
### Trying to create new dataframes from dplyr 0.4.3 functions using R 3.2.2. | |
#Very Simple Example: | |
paste("cars_with", 6, "cylinders", sep = "_") <- filter(mtcars, cyl == 6) | |
#What I want there is a dataframe named "cars_with_6_cylinders" that has the results of this: | |
filter(mtcars, cyl == 6) | |
#But instead, what I get is this: |
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
# Started from here, an example from Hadley Wickham in the google groups https://groups.google.com/forum/#!topic/ggvis/AJZCdjFcNaE. | |
# Using R 3.2.1 x86_64, ggvis 0.4.2. | |
cocaine %>% | |
ggvis( ~ potency, ~ price) %>% | |
filter(state %in% eval(input_checkboxgroup(c("IA", "MN", "WI"), | |
selected = "WI"))) %>% | |
layer_points(fill = ~ state, size := 50, opacity := 0.5) | |
# This works fine and evals the way one would expect. |
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
> may_2015 <- | |
+ read_csv( | |
+ "Z:/data_CSVs/thingsandstuff_files/may2015.csv" | |
+ ) | |
Assertion failed! | |
Program: C:\Users\ahm0\Documents\RStudio\bin\rsession.exe | |
File: d:/RCompile/CRANpkg/lib/3.2/BH/include/boost/spirit/home/support/detail/pow10.hpp, Line 87 | |
Expression: dim < sizeof(exponents)/sizeof(double) |
OlderNewer