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
#!/bin/sh | |
# takes as arguments all the files to be uploaded, uploads with a tag of the timestamp which it uses to create the slideshow | |
# Note the backticks to get the return value of the function | |
MYTAG=`date +%Y%m%d%H%M%S` | |
flickr_upload --tag="$MYTAG" $* | |
# download the right format for flickr slideshows (from a raw gist of mine) |
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
<html> <object width="400" height="300"> <param name="flashvars" value="offsite=true&lang=en-us&page_show_url=%2Fphotos%2Fcboettig%2Ftags%2Funique_tag%2Fshow%2F&page_show_back_url=%2Fphotos%2Fcboettig%2Ftags%2Funique_tag%2F&user_id=46456847@N08&tags=unique_tag&jump_to=&start_index="></param> <param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"></param> <param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&lang=en-us&page_show_url=%2Fphotos%2Fcboettig%2Ftags%2Funique_tag%2Fshow%2F&page_show_back_url=%2Fphotos%2Fcboettig%2Ftags%2Funique_tag%2F&user_id=46456847@N08&tags=unique_tag&jump_to=&start_index=" width="400" height="300"></embed></object> </html> | |
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
require(ouch) | |
####### Anoles example ######## | |
data(bimac) # ouch package Anolis sizes (from N. Lesser Antilles) | |
tree <- with(bimac,ouchtree(node,ancestor,time/max(time),species)) | |
bm <- brown(log(bimac['size']),tree) | |
ou1 <- hansen(log(bimac['size']),tree,bimac['OU.1'],1,1) | |
ou3 <- hansen(log(bimac['size']),tree,bimac['OU.3'],1,1) | |
ou4 <- hansen(log(bimac['size']),tree,bimac['OU.4'],1,1) |
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
pow <- power_between_models(ou2,ouLP, nboot=1000) | |
png("OU2vOULP.png") | |
plot(density(pow$null_dist), xlim=c(-40,40), lwd=3, main="OU.2 v OU.LP") | |
lines(density(pow$test_dist), xlim=c(-40,40), lwd=3, lty=2) | |
abline(v=-2*(ouLP@loglik-ou2@loglik), lwd=3, col="darkred" ) | |
legend("topleft", c("sim under OU.2", "sim under OU.LP"), lty=c(1,2)) | |
dev.off() |
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
# Create a left-aligned title | |
# side = 3 means top margin | |
# adj = 0 means left align | |
# line= 1.2 moves the text up | |
plot(1:10, 1:10, yaxt="n", ylab=""); | |
mtext("Title", side=3, adj=0, line=1.2, cex=2, font=2); | |
axis(2, las=1) |
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
#!/bin/bash | |
# Convert all pdf to png | |
for f in *.pdf | |
do | |
convert "$f" "${f%.pdf}.png" | |
done |
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
[flickr-gallery mode="search" tags="adaptivedynamics" min_upload_date="2011-01-06 00:00:00" max_upload_date="2011-01-06 23:59:59"] | |
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
setOldClass("myS3Class") | |
setGeneric("foo", function(x, ...) standardGeneric("foo")) | |
foo = | |
function(x, ...) | |
UseMethod("foo") | |
foo.myS3Class = |
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
########################################################## | |
# King Markov, island dictator example | |
# this is a simple metropolis algorithm | |
num.visits <- 20000 | |
population <- 1:10 | |
current.island <- sample( 1:10 , size=1 ) | |
visits <- {} | |
par(mfrow=c(2,1)) | |
for ( i in 1:num.visits ) { | |
visits[i] <- current.island |