Created
February 4, 2014 15:24
-
-
Save ewels/8805738 to your computer and use it in GitHub Desktop.
Make strip plots for all files in a directory
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
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