Hello all, I did not attach data as this is probably simple answer that I
cannot find.

I am collecting daily data and would like to plot the data by week but now
that we are into the new year, my plots started over with 01 after the last
week of the year.  How can I continuously keep adding weeks such as 53, 54,
55, 56, etc. instead of starting over?

Below has worked for me until we moved into 2019.

data$Date    <- as.Date(data$TIMESTAMP,format="%m/%d/%y  %H:%M")
data$Week1    <- strftime(data$Date,format = "%V")
data$Week<-as.factor(data$Week1)

Keith

M. Keith Cox, Ph.D.
Principal
MKConsulting
17415 Christine Ave.
Juneau, AK 99801
U.S. 907.957.4606

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to