search for: dafr

Displaying 2 results from an estimated 2 matches for "dafr".

Did you mean: afr
2010 Nov 30
2
ggplot2 histograms
...sequence in d1 but I don't know it and just threw this together quickly) d1<-c(1,2,2,3,3,3,4,4,4,4,5,5,5,5,5,6,6,6,6,7,7,7,8,8,9,6,7,7,8,8,8,9,9,9,9,10,10,10,10,10,11,11,11,11,12,12,12,13,13,14,15,15,16,16,16,17,17,17,17,18,18,18,18,18) d2<-c(rep("a",25), rep("b",39)) dafr<-data.frame(d1,d2) library(ggplot) qplot(d1, data=dafr, fill=d2, geom='histogram', binwidth = 1) Many thanks for any help Sandy Sandy Small Clinical Physicist NHS Forth Valley and NHS Greater Glasgow and Clyde *************************************************************************...
2009 Mar 07
2
piecewise linear regression
....Names = c("year", "percent", "se"), class = "data.frame", row.names = c(NA, -16L)) with(d,plot(year,percent,pch=16,xlim=c(1988,2007))) m=lm(percent~ year + I(year-1996):I(year <= 1996), weights=1/se, subset=year>=1988, da=d); points(d$year,predict(m,dafr(year=d$year)),type='l',lwd=2,col='red') thanks very much David Freedman -- View this message in context: http://www.nabble.com/piecewise-linear-regression-tp22388118p22388118.html Sent from the R help mailing list archive at Nabble.com.