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
b0370084
Commit
b0370084
authored
Aug 31, 2023
by
Clement MOLINA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
creation fichier cours
parent
4e196e82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
analyse cours.Rmd
module3/analyse cours.Rmd
+58
-0
No files found.
module3/analyse cours.Rmd
0 → 100644
View file @
b0370084
---
title: "Analyse de l'incidence du syndrome grippal"
author: "Clément MOLINA"
date: "2023-08-31"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
data_url = "https://www.sentiweb.fr/datasets/incidence-PAY-3.csv?v=4bf55"
```
```{r}
data = read.csv(data_url, skip = 1)
head(data)
```
```{r}
tail(data)
```
```{r}
lignes_na = apply(data, 1, function (x) any(is.na(x)))
data [lignes_na,]
```
```{r}
class(data$week)
```
```{r}
class(data$inc)
```
```{r}
data = read.csv(data_url, skip = 1,na.strings = "-")
```
```{r}
lignes_na = apply(data, 1, function (x) any(is.na(x)))
data [lignes_na,]
```
```{r}
library(parsedate)
```
```{r}
convert_date = function(date) {
ws = paste(date)
iso = paste0(substring(ws,1,4),"-W",substring(ws,5,6))
iso
parse_iso_8601(iso)
}
```
```{r}
data$date = sapply(data$week, FUN = convert_date)
```
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