Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(dplyr)
- library(ggplot2)
- txt <- readLines("file.msOut")
- lns <- (data.frame((beg=which(grepl("segsites:",txt)))))
- output <- cut(lns, breaks = seq(0,1000, by= 100), labels = c("<100","100-200","200-300","300-400","400-500",
- "600-700","700-800,800-900","900-100"))
- table(output) %>%
- as.data.frame() %>%
- ggplot(aes(x = output, y = Freq)) +
- geom_col()
Add Comment
Please, Sign In to add comment