NA_VALUES: 'NA_VALUES' Asks for a dataframe and returns a table of how...

Description Usage Arguments Examples

View source: R/Encontrar_candidatos_dataset_v1.R

Description

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

Usage

1

Arguments

df

A dataframe with the missing values you wish to fill

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#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

Example output

Sepal.Length  Sepal.Width Petal.Length  Petal.Width      Species 
           0            0            0            0            0 
Sepal.Length  Sepal.Width Petal.Length  Petal.Width      Species 
          45           30           75            0            0 

cleanerR documentation built on May 2, 2019, 5:51 a.m.