Description Usage Arguments Value Examples
View source: R/ScriptFonctionsSourcesVpack.r
replace NA value by the mean of the column
1 | RepNAbyMean(TAB)
|
TAB |
a table with numeric values with possible NAs |
the same table as TAB but without anymore NA values
1 2 3 4 5 6 7 8 | #Le tableau pour tester :
var1<-c(8,4,5,6,NA)
var2<-c(1,NA,2,1,3)
var3<-c(NA,11,10,NA,12)
tab_essai<-data.frame(var1,var2,var3)
#L'utilisation de la fonction :
tab_essai_new<-RepNAbyMean(tab_essai)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.