This file contains hidden or 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(ggplot2); data(msleep); attach(msleep) | |
animal.brains <- na.omit( data.frame( name, round( brainwt / bodywt * 100, 1) )) | |
names(list) <- c("animal", "how.brainy") | |
This file contains hidden or 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
# This computes the USD index which is the "broad measure of the US Dollar against a BASKET of currencies" rather than against a particular pair | |
getFX(c("USD/EUR", "USD/JPY", "USD/GBP", "USD/CAD", "USD/SEK", "USD/CHF")) | |
# The formula comes from ICE markets https://www.theice.com/publicdocs/futures_us/ICE_Dollar_Index_FAQ.pdf | |
e <- .576 | |
y <- .136 | |
s <- .119 | |
l <- .091 |
This file contains hidden or 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
$ bc -l | |
bc 1.06.95 | |
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc. | |
This is free software with ABSOLUTELY NO WARRANTY. | |
For details type `warranty'. | |
2^2 | |
4 | |
2^2^2 |
This file contains hidden or 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
par(col="#333333", lwd=3, pch=20, ylim=c(0,25), ylab="", xlab="",bty="n") #ylim,ylab,xlab won't run here; just reminders | |
#low β and confident in it | |
x <- runif(20,max=20) | |
y <- x + rnorm(20,0,.5) | |
plot(x,y, xlab="", ylab="", col=rgb(.1,.1,.5,.5), ylim=c(0,25), main="very confident (low p) and large response (high β)") | |
abline(coef(lm(y~x)), col="blue", lwd=2) | |
rug(x, col=rgb(.1,.1,.5)); rug(y, col=rgb(.1,.1,.5),side=2) |
This file contains hidden or 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
vcheck=1 | |
slowpost=2 | |
ansi=1 | |
ssl=1 | |
dostream=1 | |
newline=1 | |
urlopen="w3m %U" | |
track='#Rstats #neo4j' | |
This file contains hidden or 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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head profile="http://gmpg.org/xfn/11"> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>{block:SearchPage}Search results for "{SearchQuery}" • {/block:SearchPage}{block:PostSummary}{PostSummary} • {/block:PostSummary} see things differently </title> | |
This file contains hidden or 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
#!/usr/bin/perl -s | |
######################################################################### | |
# | |
# TTYtter v2.0 (c)2007-2012 cameron kaiser (and contributors). | |
# all rights reserved. | |
# http://www.floodgap.com/software/ttytter/ | |
# | |
# distributed under the floodgap free software license | |
# http://www.floodgap.com/software/ffsl/ | |
# |
This file contains hidden or 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
F11 <- function(x) { | |
#numbers come in as floats | |
as.integer(x) | |
#error checking | |
stopifnot( is.integer(x) ) | |
#struct | |
structure(x %% 11, class="F11") | |
} |
This file contains hidden or 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
# You're meant to read through this | |
# configuraton file rather than simply | |
# copying it to your home directory. | |
# | |
# There are some places where you're | |
# meant to uncomment something if you | |
# want to use it in your TMUX. | |
# | |
# I hope it's readable. | |
# |
This file contains hidden or 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(Hmisc) | |
> require(sfsmisc) | |
> k.3 <- matrix( | |
c( | |
-2, 1, 0, | |
-1, 2, -1, | |
0, -1, 2), | |
nrow=3, ncol=3 |