Skip to content

Instantly share code, notes, and snippets.

@ewels
Created February 4, 2014 15:24
Show Gist options
  • Save ewels/8805738 to your computer and use it in GitHub Desktop.
Save ewels/8805738 to your computer and use it in GitHub Desktop.
Make strip plots for all files in a directory
setwd('C:/Your/Directory/Here')
files <- list.files(pattern="txt$")
i <- 0
values <- list()
for(file in files) {
i <- i+1
cc <- c(rep("NULL", 12), "numeric")
values[[i]] <- as.numeric(unlist(read.delim(file, colClasses = cc, skip=1, header = FALSE)))
}
names(values) <- files
par(mar=c(12,4,4,2))
stripchart(values, vertical=TRUE, method="jitter", pch=20, cex=0.8, las=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment