Skip to content

Commit

Permalink
update res
Browse files Browse the repository at this point in the history
  • Loading branch information
lgatto committed Sep 30, 2024
1 parent 4157fe6 commit 242630e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions 10-refresher.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ moy <- function(x) {
mean(x, na.rm = TRUE)
}
interro2 <- readRDS(rWSBIM1207::interro2.rds())
interro2$m <- apply(interro2[, -1], 1, moy)
Expand All @@ -137,13 +136,14 @@ interro2 <- readRDS(rWSBIM1207::interro2.rds())
library("tidyverse")
interro2 %>%
rowwise() %>%
interro2 |>
rowwise() |>
mutate(m = moy(c(interro1, interro2, interro3, interro4)))
interro2 %>%
gather(key = interro, value = score, -noma) %>%
group_by(noma) %>%
summarise(m = moy(score)) %>%
interro2 |>
pivot_longer(names_to = "interro",
values_to = "score", -noma) |>
group_by(noma) |>
summarise(m = moy(score)) |>
full_join(interro2)
```

0 comments on commit 242630e

Please sign in to comment.