-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
add the percentage format, and that data types sum 100% (numeric, date, character, logical). missings are a different set.
# Load packages
library(tidyverse) # for {dplyr} functions and the pipe %>%
library(rio) # for importing data
library(here) # for easy file referencing
#> here() starts at C:/Users/AndreeValleCampos/AppData/Local/Temp/RtmpO2QOoX/reprex-4b2452e25077-waspy-bunny
library(cleanepi)
# Read data
# e.g.: if path to file is data/simulated_ebola_2.csv then:
raw_ebola_data <- rio::import(
"https://epiverse-trace.github.io/tutorials-early/data/simulated_ebola_2.csv"
) %>%
dplyr::as_tibble() # for a simple data frame output
cleanepi::scan_data(raw_ebola_data, format = "percentage")
#> Field_names missing numeric date character logical
#> 1 age 6.9047% 89.2475% 0% 10.7525% 0%
#> 2 gender 18.7416% 5.6035% 0% 94.3965% 0%
#> 3 status 5.6549% 0% 0% 100% 0%
#> 4 date onset 0.0067% 0% 91.5945% 8.4055% 0%
#> 5 date sample 0.0133% 0% 100% 0% 0%
#> 6 region 0% 0% 0% 100% 0%Created on 2025-10-16 with reprex v2.1.1
Metadata
Metadata
Assignees
Labels
No labels