First you'll need to install a few packages if you don't already have them
install.packages(c("plyr", "ggplot2", "rfisheries"))
# Next load up the package
library(rfisheries)
checking build system type... i386-apple-darwin10.8.0 | |
checking host system type... i386-apple-darwin10.8.0 | |
checking for gcc... gcc-4.2 | |
checking whether the C compiler works... yes | |
checking for C compiler default output file name... a.out | |
checking for suffix of executables... | |
checking whether we are cross compiling... no | |
checking for suffix of object files... o | |
checking whether we are using the GNU C compiler... yes | |
checking whether gcc-4.2 accepts -g... yes |
latex input: mmd-tufte-handout-header | |
Title: Tufte latex from Rmd example | |
Base Header Level: 2 | |
latex mode: memoir | |
author: Jaime Ashander | |
copyright: 2011 Jaime Ashander | |
This work is licensed under a Creative Commons License. | |
http://creativecommons.org/licenses/by-nc-sa/3.0/ | |
latex input: mmd-natbib-plain | |
latex input: mmd-tufte-handout-begin-doc |
data(PlantGrowth) | |
pg<-subset(PlantGrowth,group!='ctrl') | |
pg$group=factor(pg$group) | |
pg1= pg[pg$group=='trt1',] | |
pg2= pg[pg$group=='trt2',] | |
hist(pg$weight) | |
lines(density(pg1$weight), col='blue') | |
lines(density(pg2$weight), col='red') |