Learn R Programming

cleanerR (version 0.1.1)

NA_VALUES: NA_VALUES Asks for a dataframe and returns a table of how many missing values are in each collum

Description

NA_VALUES Asks for a dataframe and returns a table of how many missing values are in each collum

Usage

NA_VALUES(df)

Arguments

df

A dataframe with the missing values you wish to fill

Examples

Run this code
# NOT RUN {
#This function is used to detect how many NA values are in a dataframe
# the use is pretty much always the same
#Lets consider the dataset iris
i=iris
print(NA_VALUES(i)  )
#Since it has no missing values it shows none, now lets insert some NA_VALUES there
i[sample(1:nrow(i),0.3*nrow(i)),1]=NA
i[sample(1:nrow(i),0.2*nrow(i)),2]=NA
i[sample(1:nrow(i),0.5*nrow(i)),3]=NA
print(NA_VALUES(i))
#For every dataframe the user just uses this
# }

Run the code above in your browser using DataLab