Last active
December 25, 2015 02:29
-
-
Save vmirly/6902687 to your computer and use it in GitHub Desktop.
R read files from a directory and plot them
This file contains hidden or 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
| # this R code, will read all the result files found in the specified directory, | |
| # and plot the membrane thickness as a function of time | |
| f.list <- list.files("run_05_rad8t6_den0.2/", pattern="res.tknss.*", full.names=T) | |
| d.list <- lapply(f.list, read.table) | |
| d <- do.call(rbind, d.list) | |
| d$V1=as.numeric(rownames(d))/500 | |
| plot(d, col="blue", type="l", lwd=2, xlab="Time (ns)", ylab="Thickness") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment