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
read.tps = function(data) { | |
# Reads the .tps file format produced by TPSDIG | |
# (http://life.bio.sunysb.edu/morph/ into a single data frame | |
# USAGE: R> read.tps("filename.tps") | |
a = readLines(data) # so we can do some searching and indexing | |
LM = grep("LM", a) # find the line numbers for LM | |
ID.ind = grep("ID", a) # find the line numbers for ID | |
# and the ID values, SCALE values, and image names | |
ID = gsub("(ID=)(.*)", "\\2", grep("ID", a, value=T)) | |
SCALE = gsub("(SCALE=)(.*)", "\\2", grep("SCALE", a, value=T)) |
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
SankeyR <- function(inputs, losses, unit, labels, format="plot"){ | |
######################## | |
# SankeyR version 1.01 (updated August 10, 2010) | |
# is a function for creating Sankey Diagrams in R. | |
# See http://www.sankey-diagrams.com for excellent examples of Sankey Diagrams. | |
# | |
# OPTIONS: | |
# 'inputs' is a vector of input values | |
# 'losses' is a vector of loss values | |
# 'unit' is a string of the unit |
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
plotmatrix2 <- function (data, mapping = aes()) | |
{ | |
grid <- expand.grid(x = 1:ncol(data), y = 1:ncol(data)) | |
grid <- subset(grid, x != y) | |
all <- do.call("rbind", lapply(1:nrow(grid), function(i) { | |
xcol <- grid[i, "x"] | |
ycol <- grid[i, "y"] | |
data.frame(xvar = names(data)[ycol], yvar = names(data)[xcol], | |
x = data[, xcol], y = data[, ycol], data) | |
})) |
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
theme_minimal <- function (base_size = 12, base_family = "") | |
{ | |
structure(list(axis.line = theme_blank(), axis.text.x = theme_text(family = base_family, | |
size = base_size * 0.8, lineheight = 0.9, vjust = 1), | |
axis.text.y = theme_text(family = base_family, size = base_size * | |
0.8, lineheight = 0.9, hjust = 1), axis.ticks = theme_segment(colour = "black", | |
size = 0.2), axis.title.x = theme_text(family = base_family, | |
size = base_size, vjust = 0), axis.title.y = theme_text(family = base_family, | |
size = base_size, angle = 90, vjust = 0.5), axis.ticks.length = unit(0.3, | |
"lines"), axis.ticks.margin = unit(0.5, "lines"), legend.background = theme_rect(colour = NA), |
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://stackoverflow.com/questions/10454973/how-to-create-example-data-set-from-private-data-replacing-variable-names-and-l/10458688#10458688 | |
anonym<-function(df){ | |
if(length(df)>26){ | |
LETTERS<-replicate(floor(length(df)/26),{LETTERS<-c(LETTERS, paste(LETTERS, LETTERS, sep=""))}) | |
} | |
names(df)<-paste(LETTERS[1:length(df)]) | |
level.id.df<-function(df){ | |
level.id<-function(i){ |
We can't make this file beautiful and searchable because it's too large.
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
"","datum","peak","peak.group","variable","base.peak","smooth","value" | |
"1",1,FALSE,"1","A",FALSE,0,-7 | |
"2",1,FALSE,"1","C",FALSE,0,-17 | |
"3",1,FALSE,"1","G",FALSE,0,18 | |
"4",1,FALSE,"1","T",FALSE,0,0 | |
"5",2,FALSE,"1","A",FALSE,0,1 | |
"6",2,FALSE,"1","C",FALSE,0,-4 | |
"7",2,FALSE,"1","G",FALSE,0,9 | |
"8",2,FALSE,"1","T",FALSE,0,-4 | |
"9",3,FALSE,"1","A",FALSE,0,0 |
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
#' Creates a dialog box using tcl/tk to get input from the user. | |
#' | |
#' This function will create a tcl/tk dialog box to get user input. It has been | |
#' written to be extensible so the R programmer can easily create a dialog with | |
#' any number of varaibles with custom labels and data conversion of the user | |
#' entered data. The function will return a list where the element names are | |
#' \code{vars} and the value is the user input. By default, all entry will be | |
#' converted using the \code{as.character} function. However, this can easily be | |
#' altered using the \code{fun} parameter. For example, if integers are required, | |
#' use \code{fun=c(as.integer, ...)}. It is also possible to write custom |
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
<?xml version="1.0" encoding="UTF-8" ?><xml><records><record><database name="EndNote Ecology.enl" path="/Users/LowDecarie/Dropbox/Meta presentation of stats/Data/EndNote Ecology.enl">EndNote Ecology.enl</database><source-app name="EndNote" version="15.0">EndNote</source-app><rec-number>13264</rec-number><foreign-keys><key app="EN" db-id="0xxzez5ectezp7e9zrnxp0dq5zrafepwxfe2">13264</key></foreign-keys><ref-type name="Journal Article">17</ref-type><contributors><authors><author><style face="normal" font="default" size="100%">Chapman, A. G.</style></author></authors></contributors><auth-address><style face="normal" font="default" size="100%">Cent States Forest Expt Stn, Columbus, OH USA</style></auth-address><titles><title><style face="normal" font="default" size="100%">An ecological basis for reforestation of submariginal lands in the Central Hardwood Region</style></title><secondary-title><style face="normal" font="default" size="100%">Ecology</style></secondary-title><alt-title><style face="normal" font="defa |
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
structure(list(`Reference Type` = c("17", "17", "17"), Author = c("Whitfeld, T. J. S.Novotny, V.Miller, S. E.Hrcek, J.Klimes, P.Weiblen, G. D.", | |
"Peres-Neto, P. R.Leibold, M. A.Dray, S.", "Eaton, D. A. R.Fenster, C. B.Hereford, J.Huang, S. Q.Ree, R. H." | |
), Title = c("Predicting tropical insect herbivore abundance from host plant traits and phylogenyEcologyEcology", | |
"Assessing the effects of spatial contingency and environmental filtering on metacommunity phylogeneticsEcologyEcology", | |
"Floral diversity and community structure in Pedicularis (Orobanchaceae)EcologyEcology" | |
), `Secondary Title` = c("EcologyEcology", "EcologyEcology", | |
"EcologyEcology"), `Tertiary Title` = c("EcologyEcology", "EcologyEcology", | |
"EcologyEcology"), Pages = c("S211-S222", "S14-S30", "S182-S194" | |
), Volume = c("93", "93", "93"), Number = c("8", "8", "8"), Keywords = c("comparative methodsfood websherbivorylepidopteralowland rain forestnew guineaplant defenselowland rain-forestpapua-new-guineaspecies coexistencefunctional traitsDNA b |
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
tell application "Microsoft PowerPoint" | |
activate | |
set theView to view of document window 1 | |
repeat with slideNumber from 1 to count of slides of active presentation | |
go to slide theView number slideNumber | |
tell slide slideNumber of active presentation |
OlderNewer