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
| # following example from http://genomicsclass.github.io/book/pages/plots_to_avoid.html | |
| # annotated code | |
| set.seed(12201970) | |
| before <- runif(6, 5, 8) #runif, sample function returning decimals from uniform distribution. 6 numbers, 5 is lower limit, 8 upper | |
| after <- rnorm(6, before*1.05, 2) # rnorm, returning 6 values with mean before*1.05 SD 2 | |
| li <- range(c(before, after)) # plot margins, range | |
| ymx <- max(abs(after-before)) # y margin forobserved difference plot, absolute value. | |
| #display |