We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bonjour, En utilisant la fonction changement_COG_varNum on perd des données lorsqu'elles contiennent des NA. Voici un exemple: `library(COGugaison)
df = data.frame(code=c("01138", "01138", "01006"), valeur=c(NA, 3, 4))
changement_COG_varNum(table_entree = df, codgeo_entree = "code", annees = c(2011:2023), donnees_insee = FALSE, agregation = TRUE)` qui donne :
code valeur 1 01006 4 2 01138 NA
Cela viendrait de cette ligne: aggregate(table_finale[,c(var_num)],by =list(with(table_finale,get(codgeo_entree))),FUN=sum)
aggregate(table_finale[,c(var_num)],by =list(with(table_finale,get(codgeo_entree))),FUN=sum)
Je n'ai pas testé mais il semblerait qu'en ajoutant na.rm = TRUE qu'on ait le resultat désiré ici càd:
code valeur 1 01006 4 2 01138 3
Est-il possible d'ajouter cette option à la fonction du genre: changement_COG_varNum(enlever_na=TRUE|FALSE) ?
changement_COG_varNum(enlever_na=TRUE|FALSE)
The text was updated successfully, but these errors were encountered:
Testé localement ça fonctionne bien
Sorry, something went wrong.
No branches or pull requests
Bonjour,
En utilisant la fonction changement_COG_varNum on perd des données lorsqu'elles contiennent des NA.
Voici un exemple:
`library(COGugaison)
df = data.frame(code=c("01138", "01138", "01006"), valeur=c(NA, 3, 4))
changement_COG_varNum(table_entree = df, codgeo_entree = "code",
annees = c(2011:2023), donnees_insee = FALSE, agregation = TRUE)`
qui donne :
Cela viendrait de cette ligne:
aggregate(table_finale[,c(var_num)],by =list(with(table_finale,get(codgeo_entree))),FUN=sum)
Je n'ai pas testé mais il semblerait qu'en ajoutant na.rm = TRUE qu'on ait le resultat désiré ici càd:
Est-il possible d'ajouter cette option à la fonction du genre:
changement_COG_varNum(enlever_na=TRUE|FALSE)
?
The text was updated successfully, but these errors were encountered: