[R] Time plots
Stefan Grosse
singularitaet at gmx.net
Mon Nov 17 17:20:54 CET 2008
On Mon, 17 Nov 2008 15:30:14 -0000 "Lathouri, Maria"
<m.lathouri06 at imperial.ac.uk> wrote:
LM> I want to do some time plots and actually the dates are in the
LM> format of dd/mm/yyyy. So first I input my dataframe in R in a csv
LM> form. What I do is DF<-read.csv("C:/Documents and Settings/DF.csv")
LM> DATE<-as.Date(DATE, "%d/%m/%Y") # to tell R that DATE column is
LM> indeed dates with(DF, plot(DATE,pH))
Use a time series class for your data. Then you will get plots with
lines. Have a look at the zoo package and/or ?ts
Stefan
More information about the R-help
mailing list