Learn R Programming

eye (version 1.3.0)

va_mixed: VA classes

Description

va_mixed is a wrapper around va on all possible VA notations. By default, c("snellen", "etdrs", "logmar", "snellendec") will be converted - in that order! For tricky cases see details and examples. Note that va_mixed will not notify you from which notation the values were transformed, nor if values were replaced with NA.

Usage

va_mixed(x, to = "logmar", possible = c("snellen", "etdrs", "logmar", "quali"))

Arguments

x

vector with mixed VA entries

to

to which notation to be converted

possible

possible VA notations. The order defines which class will be prioritised if a value can be from more than one class, see details. Default = c("snellen", "etdrs", "logmar", "quali")

awfully mixed notation!! (and note the wrong -1 value)

x <- c(NA, "nlp", 1:2, 1.1, -1, "20/40", "4/6", "6/1000", 34) va_mixed(x, to = "snellen")

"I only have snellen and snellen decimal notation in my data"

va_mixed(x, to = "snellen", possible = c("snellen", "snellendec"))

"I have snellen, logmar and etdrs in my data, and there is no etdrs value

less than 4" va_mixed(x, to = "snellen", possible = c("snellen", "logmar", "etdrs"))

Details

Mixed entries are challenging, but unfortunately seem to occur in real life data. It will be fairly individual what you have in yours, but it should hopefully not happen that you have all possible notations. Snellen fractions are usually not challenging because they contain a "/", thus are easy to recognize.

Values between 0 and 3 are most problematic, in particular full integers - this can be EDTRS, snellen decimal notation or logmar. By default, snellen decimal are not recognized, but you can specify this with the "possible" argument. Or, if you know that you don't have any ETDRS value less than 4, you can safely give precedence to logmar instead, like this: possible = c("snellen", "logmar", "etdrs") @examples

See Also

Other Ophthalmic functions: va()

Other VA converter: VAwrapper, plausibility_methods, snellen_steps, va(), va_methods, which_va()