I have seoul's nonacc(number of total mortality excluding accident) data and their date data. This is the sample of data. data1 have nonacc data and date data.
head(data1$date)
[1] "2000-01-01" "2000-01-02" "2000-01-03" "2000-01-04" "2000-01-05"
[6] "2000-01-06"
tail(data1$date)
[1] "2007-12-26" "2007-12-27" "2007-12-28" "2007-12-29" "2007-12-30"
[6] "2007-12-31"
head(seoul$nonacc)
[1] 139 144 130 149 143 136
I want to draw the association between date and nonacc as a scatterplot. But I want to draw a scatter plot divided by year and month.
So I tried this, but theirs results are same...
Its the month scatter plot that I tried.
plot(seoul$date,seoul$nonacc,
xlab="Date", ylab="Nonaccidental Mortality",
xaxt="n")
seq(as.Date("2000-01-01"), as.Date("2002-12-31"),"day")
x.at <- seq(as.Date("2000-01-01"), as.Date("2007-12-31"),"month")
xname = seq(2000, 2007, 1)
axis(side=1, at=x.at, labels=x.at, las=1)
Its the year scatter plot that I tried.
plot(seoul$date,seoul$nonacc,
xlab="Date", ylab="Nonaccidental Mortality",
xaxt="n")
seq(as.Date("2000-01-01"), as.Date("2002-12-31"),"day")
x.at <- seq(as.Date("2000-01-01"), as.Date("2007-12-31"),"year")
xname = seq(2000, 2007, 1)
axis(side=1, at=x.at, labels=x.at, las=1)
Help me please.