Skip to content
Prev 317550 / 398503 Next

Problems plotting and regression w.r.t. date data type on x axis

Hi
As expected date is factor, number is numeric and date2 is POSIXlt format.
Here you are plotting number against POSIX date2.
Here you use date probably converted by as.Date. Why you do not use 

lm(number ~ date2, data = tabelle)

which is usual form of model formula.

Try also change date2 by as.POSIXct.

Regards
Petr