Skip to contents

Label whether a value is missing in a row of one columns.

Usage

label_miss_1d(x1)

Arguments

x1

a variable of a dataframe

Value

a vector indicating whether any of these rows had missing values

Note

can we generalise label_miss to work for any number of variables?

Examples


label_miss_1d(airquality$Ozone)
#>   [1] Not Missing Not Missing Not Missing Not Missing Missing     Not Missing
#>   [7] Not Missing Not Missing Not Missing Missing     Not Missing Not Missing
#>  [13] Not Missing Not Missing Not Missing Not Missing Not Missing Not Missing
#>  [19] Not Missing Not Missing Not Missing Not Missing Not Missing Not Missing
#>  [25] Missing     Missing     Missing     Not Missing Not Missing Not Missing
#>  [31] Not Missing Missing     Missing     Missing     Missing     Missing    
#>  [37] Missing     Not Missing Missing     Not Missing Not Missing Missing    
#>  [43] Missing     Not Missing Missing     Missing     Not Missing Not Missing
#>  [49] Not Missing Not Missing Not Missing Missing     Missing     Missing    
#>  [55] Missing     Missing     Missing     Missing     Missing     Missing    
#>  [61] Missing     Not Missing Not Missing Not Missing Missing     Not Missing
#>  [67] Not Missing Not Missing Not Missing Not Missing Not Missing Missing    
#>  [73] Not Missing Not Missing Missing     Not Missing Not Missing Not Missing
#>  [79] Not Missing Not Missing Not Missing Not Missing Missing     Missing    
#>  [85] Not Missing Not Missing Not Missing Not Missing Not Missing Not Missing
#>  [91] Not Missing Not Missing Not Missing Not Missing Not Missing Not Missing
#>  [97] Not Missing Not Missing Not Missing Not Missing Not Missing Missing    
#> [103] Missing     Not Missing Not Missing Not Missing Missing     Not Missing
#> [109] Not Missing Not Missing Not Missing Not Missing Not Missing Not Missing
#> [115] Missing     Not Missing Not Missing Not Missing Missing     Not Missing
#> [121] Not Missing Not Missing Not Missing Not Missing Not Missing Not Missing
#> [127] Not Missing Not Missing Not Missing Not Missing Not Missing Not Missing
#> [133] Not Missing Not Missing Not Missing Not Missing Not Missing Not Missing
#> [139] Not Missing Not Missing Not Missing Not Missing Not Missing Not Missing
#> [145] Not Missing Not Missing Not Missing Not Missing Not Missing Missing    
#> [151] Not Missing Not Missing Not Missing
#> Levels: Missing Not Missing