Guest User

Untitled

a guest
Jan 23rd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. library(dplyr)
  2. library(ggplot2)
  3.  
  4. txt <- readLines("file.msOut")
  5.  
  6. lns <- (data.frame((beg=which(grepl("segsites:",txt)))))
  7.  
  8. output <- cut(lns, breaks = seq(0,1000, by= 100), labels = c("<100","100-200","200-300","300-400","400-500",
  9. "600-700","700-800,800-900","900-100"))
  10.  
  11. table(output) %>%
  12. as.data.frame() %>%
  13. ggplot(aes(x = output, y = Freq)) +
  14. geom_col()
Add Comment
Please, Sign In to add comment