[R] plotting date data over couple of months
vamshi999
vamshi999 at gmail.com
Thu Jul 14 02:09:22 CEST 2011
I am sorry i was not clear in my early post....
I have used the below code to change my data into date format..
r<-as.POSIXlt(paste(data2$date,data2$time))
library(gsubfn)
library(chron)
r<-as.chron(r)
data2$date<-strftime(strptime(r, format="(%m/%d/%y %H:%M:%S)"),"%Y-%m-%d")
data2$time<-strftime(strptime(r, format="(%m/%d/%y %H:%M:%S)"),"%H:%M:%S")
now i have a date variable in the below format..
"2011-04-20"
while plotting dates using the above format.. i was getting the x-axis in
this way..
----------------------
2011-04-29 2011-05-05
but i want the values in my x-axis to be in this format..
------------------
27 28 29 30 1 2 3 4
April May
about the error plots.... i was not able to compute the mean and sd values
..
My data has the following columns..
date, time, height..
this is the bird data which we recorded.. so i have date, time, height at
which the birds are being detected . so now i want to plot errorbar for
total no.of birds detected on each day..
for a simple plot ..i used.. counts<-table(data$date).. i was able to get
the count on each day..
then.. barplot(counts).. but i was not able to calculate the mean and sd for
counts..
thank you
--
View this message in context: http://r.789695.n4.nabble.com/plotting-date-data-over-couple-of-months-tp3666298p3666377.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list