Skip to content

Instantly share code, notes, and snippets.

View DaveParr's full-sized avatar

Dave Parr DaveParr

View GitHub Profile
@dsparks
dsparks / MakeTable.R
Created February 9, 2011 18:37
helper function for parsing text
makeTable <- function(vector, toregex){ do.call(rbind, strsplit(vector, toregex)) }
@dsparks
dsparks / LineFinder.R
Created February 9, 2011 18:36
locates a string in a vector of strings
lineFinder <- function(string, vector){ (1:length(vector))[regexpr(string, vector) != -1] }