View source: R/ScriptFonctionsSourcesVpack.r
Replace.NA | R Documentation |
replace NA value by the mean of the column
Replace.NA(TAB)
TAB |
a table with numeric values with possible NAs |
the same table as TAB but without anymore NA values
#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<-Replace.NA(tab_essai)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.