Learn R Programming

eye (version 1.2.1)

clean_va: Cleaning up Visual acuity entries

Description

VA cleaning:

  1. tidyNA: Replacing empty placeholders (".","", "(any number of empty space)", "NULL", "NA", "N/A" , "-") - any cases - with NA

  2. Simplifying the notation for qualitative VA notation (NPL becomes NLP, PL becomes LP)

  3. Removing non-Snellen character strings

Usage

clean_va(x, quali = c("nlp", "lp", "hm", "cf"), message = TRUE)

cleanVA(x, quali = c("nlp", "lp", "hm", "cf"), message = TRUE)

Arguments

x

Vector with VA entries

quali

strings for qualitative visual acuity entries

message

message for replaced NA values

Value

character vector

See Also

Other VA cleaner: va()