R/Missing_data.R

Missing_data <-
function(data){

  # Missing variables
    mv<- c()
    for (i in 1:nrow(data)) mv[i]<- sum(is.na(data[i,1:ncol(data)]))
    mv2<- which(mv>0)

  # Deletion of rows with missing values
    if (length(mv2)>0) data<- data[-mv2,] 
    return(data)
}

Try the NHEMOtree package in your browser

Any scripts or data that you put into this service are public.

NHEMOtree documentation built on May 2, 2019, 7:32 a.m.