Displaying 1 result from an estimated 1 matches for "do_hapa_all_morning".
2010 Dec 22
1
problems with abline in a time line scatterplot
...o R-Users
i'm stuck with the following problem:
i want to add a trend line to a scatterplot. the x axis is a time line.
well it doesnt work, it seems that the function abline is not able
to handle the fact, that i used the column Date as a factor.
this is the script:
data<-read.table('DO_hapa_all_morning.txt',header=T,as.is=2)
attach(data)
names(data)
plot(DO,axes=F,xlab="Date",ylab="DO [mg/l]",ylim=c(0,12),col="red")
axis(1,at=1:length(DO),labels=Date)
axis(2)
abline(lm(DO~Date),col="red")
this warning message shows up (last row translated from german):...