Check for value(s) in the dataset
check_value.Rd
Check for value(s) in the dataset
Usage
check_value(
dataset,
uuid_column = "uuid",
element_name = "checked_dataset",
values_to_look = c(99, 999, 999, 88, 888, 888)
)
Arguments
- dataset
dataset to be check as a dataframe or a list with the dataframe stored as "checked_dataset"
- uuid_column
uuid column in the dataset. Default is "uuid".
- element_name
Name of the dataset in list
- values_to_look
Values to look. Default are- 99,999,999,88,888,888
Examples
df <- data.frame(
X_uuid = paste0("uuid_", 1:100),
age = c(sample(18:80, replace = TRUE, size = 96), 99, 99, 98, 88),
gender = c("99", sample(c("male", "female"),
replace = TRUE, size = 95
), "98", "98", "88", "888")
)
check_value( dataset = df, uuid_column = "X_uuid",
element_name = "checked_dataset",
values_to_look = c(99, 98, 88, 888)) |>
knitr::kable()
#>
#>
#> |X_uuid | age|gender |
#> |:--------|---:|:------|
#> |uuid_1 | 62|99 |
#> |uuid_2 | 76|female |
#> |uuid_3 | 33|male |
#> |uuid_4 | 52|female |
#> |uuid_5 | 27|male |
#> |uuid_6 | 71|female |
#> |uuid_7 | 19|male |
#> |uuid_8 | 72|female |
#> |uuid_9 | 64|female |
#> |uuid_10 | 48|male |
#> |uuid_11 | 61|female |
#> |uuid_12 | 69|female |
#> |uuid_13 | 30|male |
#> |uuid_14 | 76|male |
#> |uuid_15 | 55|male |
#> |uuid_16 | 36|male |
#> |uuid_17 | 80|male |
#> |uuid_18 | 27|female |
#> |uuid_19 | 34|female |
#> |uuid_20 | 23|male |
#> |uuid_21 | 54|male |
#> |uuid_22 | 21|female |
#> |uuid_23 | 21|female |
#> |uuid_24 | 19|female |
#> |uuid_25 | 48|male |
#> |uuid_26 | 54|male |
#> |uuid_27 | 42|female |
#> |uuid_28 | 43|male |
#> |uuid_29 | 22|female |
#> |uuid_30 | 41|female |
#> |uuid_31 | 30|male |
#> |uuid_32 | 55|female |
#> |uuid_33 | 35|male |
#> |uuid_34 | 18|male |
#> |uuid_35 | 78|male |
#> |uuid_36 | 64|male |
#> |uuid_37 | 35|male |
#> |uuid_38 | 53|female |
#> |uuid_39 | 19|male |
#> |uuid_40 | 69|female |
#> |uuid_41 | 65|male |
#> |uuid_42 | 72|female |
#> |uuid_43 | 25|female |
#> |uuid_44 | 45|male |
#> |uuid_45 | 30|female |
#> |uuid_46 | 38|male |
#> |uuid_47 | 59|male |
#> |uuid_48 | 72|male |
#> |uuid_49 | 55|female |
#> |uuid_50 | 65|female |
#> |uuid_51 | 45|female |
#> |uuid_52 | 28|male |
#> |uuid_53 | 23|female |
#> |uuid_54 | 78|male |
#> |uuid_55 | 62|male |
#> |uuid_56 | 48|female |
#> |uuid_57 | 66|female |
#> |uuid_58 | 64|male |
#> |uuid_59 | 67|male |
#> |uuid_60 | 23|male |
#> |uuid_61 | 71|male |
#> |uuid_62 | 57|male |
#> |uuid_63 | 56|female |
#> |uuid_64 | 59|male |
#> |uuid_65 | 20|female |
#> |uuid_66 | 46|female |
#> |uuid_67 | 74|male |
#> |uuid_68 | 43|female |
#> |uuid_69 | 64|male |
#> |uuid_70 | 25|male |
#> |uuid_71 | 34|male |
#> |uuid_72 | 65|male |
#> |uuid_73 | 75|female |
#> |uuid_74 | 47|male |
#> |uuid_75 | 22|male |
#> |uuid_76 | 74|female |
#> |uuid_77 | 45|male |
#> |uuid_78 | 60|female |
#> |uuid_79 | 21|female |
#> |uuid_80 | 20|female |
#> |uuid_81 | 31|male |
#> |uuid_82 | 58|female |
#> |uuid_83 | 26|male |
#> |uuid_84 | 18|male |
#> |uuid_85 | 59|female |
#> |uuid_86 | 71|male |
#> |uuid_87 | 62|male |
#> |uuid_88 | 27|male |
#> |uuid_89 | 50|female |
#> |uuid_90 | 22|female |
#> |uuid_91 | 75|male |
#> |uuid_92 | 53|female |
#> |uuid_93 | 50|male |
#> |uuid_94 | 61|male |
#> |uuid_95 | 49|male |
#> |uuid_96 | 18|male |
#> |uuid_97 | 99|98 |
#> |uuid_98 | 99|98 |
#> |uuid_99 | 98|88 |
#> |uuid_100 | 88|888 |
#>
#> |uuid |question |old_value |issue |
#> |:--------|:--------|:---------|:----------------------------------|
#> |uuid_1 |gender |99 |Possible value to be changed to NA |
#> |uuid_97 |age |99 |Possible value to be changed to NA |
#> |uuid_97 |gender |98 |Possible value to be changed to NA |
#> |uuid_98 |age |99 |Possible value to be changed to NA |
#> |uuid_98 |gender |98 |Possible value to be changed to NA |
#> |uuid_99 |age |98 |Possible value to be changed to NA |
#> |uuid_99 |gender |88 |Possible value to be changed to NA |
#> |uuid_100 |age |88 |Possible value to be changed to NA |
#> |uuid_100 |gender |888 |Possible value to be changed to NA |