-1

I'm using vis_dat package in R to plot the missing values in my dataset. This is the code I have so far.

# Load the libraries
library(visdat)

# Load the data set
data(Ionosphere)
dataset <- Ionosphere
dataset <- dataset[,-2]
dataset$V1 <- as.numeric(as.character(dataset$V1))

# Plot missing values
vis_miss(dataset, cluster = TRUE)

Running this code gives the following error. Error in vis_miss(dataset, cluster = TRUE) : could not find function "vis_miss"

Does anyone know how to fix this issue?

Sanushi Salgado
  • 1,195
  • 1
  • 11
  • 18
  • Did you run `library(vis_dat)` or `library(visdat)`? Did it return any error messages? – MrFlick Apr 25 '21 at 17:33
  • Actually I used visdat package. The package was not installed earlier, after installing it it worked fine. & now I'm able to plot the missing values using vis_miss(). – Sanushi Salgado Apr 25 '21 at 17:41
  • OK. if the package wasn't installed, you should have got an error on the `library(visdat)` line. It's usually best to start with the first error you get. – MrFlick Apr 25 '21 at 17:42
  • By the way, are they both same? (vis_dat & visdat packages). – Sanushi Salgado Apr 25 '21 at 17:45
  • As far as I know there's no such thing as the `vis_dat` pacakge. But not all packages are on CRAN and when you create your own personal package you can name it whatever you want so it's not always clear what's a valid package name and what is not. You usually just have to google it. – MrFlick Apr 25 '21 at 17:47
  • Because in this link I found they have used visdat package https://bradleyboehmke.github.io/HOML/engineering.html#dealing-with-missingness & in this link the vis_dat package has been used https://www.rdocumentation.org/packages/visdat/versions/0.0.4.9700 – Sanushi Salgado Apr 25 '21 at 17:51

1 Answers1

0

Installing the visdat package using the below code, would fix the error.

# Install package
install.packages("visdat")
Sanushi Salgado
  • 1,195
  • 1
  • 11
  • 18