Skip to content

Commit

Permalink
correction COG_akinator (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
antuki committed Jul 1, 2024
1 parent 57d68fb commit 37a6d4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,5 @@
### juillet 2024

* Les tables COG2022 et COG2022_insee étaient erronées (COG2021 à la place) cf. [#20](https://github.com/antuki/COGugaison/issues/20)

* Correction d'un morceau de code de `COG_akinator` [#21](https://github.com/antuki/COGugaison/issues/21)
2 changes: 1 addition & 1 deletion R/COG_akinator.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ COG_akinator <- function (vecteur_codgeo, donnees_insee = TRUE)
vecteur_codgeo_COG <- get(paste0("COG", annee))[, 1]
vecteur_codgeo_COG <- vecteur_codgeo_COG[-which(substr(vecteur_codgeo_COG,1, 2) == 97)]
vecteur_codgeo_COG[which(vecteur_codgeo_COG%in%c("14472"))] <-"14697" #cas l'Oudon
if (length(setdiff(vecteur_codgeo_COG,vecteur_codgeo))==0) { # new : avant all(vecteur_codgeo %in% vecteur_codgeo_COG)
if (length(setdiff(vecteur_codgeo, vecteur_codgeo_COG))==0) { # new : avant all(vecteur_codgeo %in% vecteur_codgeo_COG)
COG_possibles <- c(COG_possibles, paste0("COG", annee))
}
}
Expand Down

0 comments on commit 37a6d4c

Please sign in to comment.