Description Usage Arguments Value Examples
Characterizes only variables of a data set with missing values. So, missing values are painted black, while other observations keep white.
1 2 |
data |
[ |
dataset.name |
[ |
show.plot |
[ |
show.result |
[ |
margin.left |
[ |
A [naSumObj
] with Names of the variables with their frequency of missing values and two additional plots
which shows the position of the missing values (color = black) for each variable with NAs and the number of missing values as a bar plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data("airquality")
#create new columns
set.seed(1217)
airquality$new1 = sample(1:nrow(airquality))
airquality$new2 = rnorm(nrow(airquality))
#add more NAs
idx = sample(1:nrow(airquality), size = 15)
airquality[idx, c("new1", "new2")] = NA
idx2 = sample(1:nrow(airquality), size = 7)
airquality[idx2, "Temp"] = NA
#create the NA summary
na.summary = naSummary(data = airquality, show.plot = TRUE,
show.result = FALSE, margin.left = 4, dataset.name = "Airquality")
#plot the object through print
na.summary
#retrieve the elements through the components
na.summary$nsum
na.summary$image()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.