va_mixed {eye} | R Documentation |
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 give nice messages which values are transformed from which notation, and which values were replaced with NA.
Usage
va_mixed(x, to, possible)
Arguments
x |
vector with mixed VA entries |
to |
to which notation to be converted |
possible |
which possible VA notations - and the precedence given, see details |
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.
Most problematic are values between 0 and 3,
in particular full integers - this can be EDTRS, snellen decimal notation
or logmar. If your data doesn't have snellen decimal notation,
specify this with "possible", e.g. with
possible = c("snellen", "etdrs", "logmar")
. 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
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"))
See Also
Other Ophthalmic functions:
va()
Other VA converter:
VAwrapper
,
plausibility_methods
,
snellen_steps
,
va_methods
,
va()
,
which_va()