search for: rainmm

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

Did you mean: rainer
2008 Jun 05
1
choosing an appropriate linear model
...te a better predictive model? I presume it has something to do with glm, especially since I have repeated rainfalls on replicate samples, but any advice on the approach to take would be much appreciated. The code I used to produce the attached plots is included below. leach.lm <- lm(leachate~rainmm-1,data=leachdata) png("dianostics.png",height=1200,width=700) par(mfrow=c(3,2)) plot(leachate~rainmm,data=leachdata,main="Data and fitted line") abline(leach.lm) plot(predict(leach.lm)~leachdata$leachate,main="predicted vs. observed leaching amount",xlim=c(0,12),ylim=...
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame. For instance > ddTable <- data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry")) I want a dataset that is Id Name 1 Paul 2 Bob > unique(ddTable) Will give me all 4 rows, and > unique(ddTable$Id) Will give me c(1,2), but not accompanied by the name column.