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
| data(sicalis) | |
| # plot the desired spectra, leaving room horizontally to add labels | |
| plot(sicalis, select=2:4, xlim=c(300,800)) | |
| # find the y position to add the labels right where they finish (wavelength=700) | |
| # using nrow to select the last row (for the last wavelength value) | |
| # subset the last wavelength value (column 1) |
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
| require(ggplot2) | |
| require(plyr) | |
| # make toy data | |
| set.seed(1) | |
| dataf <- data.frame( | |
| x = rnorm(100), | |
| y = c(rnorm(50,-1), rnorm(50,1)), | |
| cat = rep(c("A","B"), each=50) | |
| ) |
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
| require(RColorBrewer) | |
| # RColorBrewer provides the palettes developped by Cynthia Brewer, you can check them | |
| # out at http://colorbrewer2.org/ . | |
| # make some mock data with interaction | |
| x1 <- factor(rep(c('a','b','c'),each=33)) | |
| x2 <- rnorm(99,10,2) |
NewerOlder