ctors=FALSE)
dat1$days<-as.numeric(format(as.Date(dat1$Date,format="%m/%d/%Y"),"%w"))
plot(Var~days,data=dat1,xaxt="n",xlab="Day of week")
axis(1,at=dat1$days,labels=dat1$day)
A.K.
- Original Message -
From: Ye Lin
To: R help
Cc:
Sent: Tuesday, May
Hey I have a dataset like this:
Date Var day 1/1/2013 1 Tue 1/2/2013 2 Wed 1/3/2013 3 Thu 1/4/2013 4
Fri 1/5/2013 5 Sat 1/6/2013 6 Sun 1/7/2013 7 Mon 1/8/2013 8 Tue
1/9/2013 9 Wed 1/10/2013 10 Thu
And I want to plot Var~day
Here is the code I use:
plot(Dataset$Var~Dataset$day,xlab='Day
2 matches
Mail list logo