Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
30125d9ab35d766e3f93eaa8c4ed2e82
mooc-rr
Commits
e45484a9
Commit
e45484a9
authored
Sep 04, 2023
by
Clement MOLINA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mis a jour
parent
b0370084
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
analyse cours.Rmd
module3/analyse cours.Rmd
+23
-5
No files found.
module3/analyse cours.Rmd
View file @
e45484a9
...
@@ -44,15 +44,33 @@ data [lignes_na,]
...
@@ -44,15 +44,33 @@ data [lignes_na,]
library(parsedate)
library(parsedate)
```
```
```{r}
```{r}
convert_date = function(
date
) {
convert_date = function(
w
) {
ws = paste(
date
)
ws = paste(
w
)
iso = paste0(substring(ws,1,4),"-W",substring(ws,5,6))
iso = paste0(substring(ws,1,4),"-W",substring(ws,5,6))
iso
as.character(parse_iso_8601(iso))
parse_iso_8601(iso)
}
}
```
```
```{r}
```{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"))
```
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment