Commit e45484a9 authored by Clement MOLINA's avatar Clement MOLINA

mis a jour

parent b0370084
......@@ -44,15 +44,33 @@ data [lignes_na,]
library(parsedate)
```
```{r}
convert_date = function(date) {
ws = paste(date)
convert_date = function(w) {
ws = paste(w)
iso = paste0(substring(ws,1,4),"-W",substring(ws,5,6))
iso
parse_iso_8601(iso)
as.character(parse_iso_8601(iso))
}
```
```{r}
data$date = sapply(data$week, FUN = convert_date)
data$date = as.Date(convert_date(data$week))
```
```{r}
class(data$date)
```
```{r}
data = data[order(data$date),]
```
```{r}
all(diff(data$date) == 7)
```
```{r}
plot(data$date, data$inc, type="l", xlab="Date", ylab="Incidence hebdomadaire")
```
```{r}
with(tail(data, 200), plot(date, inc, type="l", xlab="Date", ylab="Incidence hebdomadaire"))
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment