Closed shlid007 closed 1 year ago
Hi there!
Thanks for posting. You need to install the R package to get all the necessary functions loaded. You can do this with:
install.packages("naniar")
Then this code should work:
library(naniar)
mcar_test(airquality)
#> # A tibble: 1 × 4
#> statistic df p.value missing.patterns
#> <dbl> <dbl> <dbl> <int>
#> 1 35.1 14 0.00142 4
Created on 2023-10-23 with reprex v2.0.2
Let me know how you go!
I have run the following code but am getting the error, Error in test_if_dataframe(data) : could not find function "test_if_dataframe".
Any ideas?
remotes::install_github("njtierney/naniar", force = TRUE)
devtools::source_url("https://github.com/njtierney/naniar/blob/master/R/mcar-test.R?raw=TRUE")
mcar_test(x)