[R] strptime and plot(),lines()
erkan yanar
erkan.yanar at linsenraum.de
Thu Mar 27 14:59:23 CET 2008
Hello,
Im reading Data out of a Database.
#v+
rs <- dbGetQuery(con,"SELECT * ... )
attach(rs)
#v-
There ist a colum I convert into "Time".
#v+
> zeit<-strptime(datum,format="%Y-%m-%d %H:%M:%S");
> class(zeit)
[1] "POSIXt" "POSIXlt"
#v-
1.
A plot(zeit,money) plots the Data.
All i see on the x-achis are the Days.
I would like to see the hours also.
2.
length(zeit) gives mit the length of one entry.
But zeit exists of 500 entries.
How can i get the amount of entries zeit got?
3.
Im used to draw whith lines() into an existing plot.
But something like lines(zeit,food) wouldnt work.
All this works quit well, when Im using unixtime. But seconds since
1970 are not that nice on the x-achis:-)
Regards
Erkan Yanar
--
über den grenzen muß die freiheit wohl wolkenlos sein
More information about the R-help
mailing list