RepNAbyMean: Replace NA by mean

Description Usage Arguments Value Examples

View source: R/ScriptFonctionsSourcesVpack.r

Description

replace NA value by the mean of the column

Usage

1

Arguments

TAB

a table with numeric values with possible NAs

Value

the same table as TAB but without anymore NA values

Examples

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)

RenaudJau/Renaudpack2 documentation built on Dec. 12, 2020, 5:14 a.m.