Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setwd("~/data/observation1")
- library(ggplot2)
- ggplot(a, aes(x = place, y = firing_rate)) + geom_point() + geom_path()
- files <- list.files(pattern=".txt")
- for (i in files){
- mylist <- lapply(setNames(files, files), read.table, header = T)
- mylist <- lapply(names(mylist), function(i) {cbind(mylist[[i]], ID = i)})
- mydata <- do.call(rbind, mylist)
- }
- ggplot(mydata, aes(x = place, y = firing_rate, colour = ID)) + geom_point() + geom_path()
- dev.print(pdf, 'observation1.pdf')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement