Learn R Programming

eye (version 1.3.0)

va: Visual acuity notation conversion

Description

Cleans and converts visual acuity notations (classes) between Snellen (decimal, meter and feet), ETDRS, and logMAR.

Usage

va(
  x,
  from = NULL,
  to = NULL,
  type = "ft",
  smallstep = FALSE,
  noplus = FALSE,
  quali_values = NULL
)

Value

vector of va class. See also "VA classes"

Arguments

x

Vector with visual acuity entries. Must be atomic. Snellen fractions need to be entered with "/"

from

will force to evaluate from which notation to convert - Must be "etdrs", "logmar", "snellen" or "snellendec". Ignored if the value should not be plausible.

to

To which class to convert. "etdrs", "logmar" or "snellen" - any case allowed. If NULL (default), will simply "clean up" VA entries. This may then result in a vector of "mixed" VA notations.

type

To which Snellen notation to convert: "m", "dec" or "ft"

smallstep

how +/- entries are evaluated. FALSE: increase/decrease Snellen fractions by lines. TRUE: plus/minus entries equivalent to 0.02 logmar

noplus

ignoring plus/minus entries and just returning the snellen fraction. This overrides the smallstep argument.

quali_values

define your own values for qualitative entries (see details)

VA conversion

  • logMAR to ETDRS: logMAR rounded to the first digit and converted with the visual acuity chart (see section VA chart)

  • Snellen to logMAR: logMAR = -1 * log10(snellen_frac)

  • Snellen to ETDRS: ETDRS = 85 + 50 * log10(snellen_frac) Gregori et al. DOI: 10.1097/iae.0b013e3181d87e04

  • ETDRS to logMAR: logMAR = -0.02 * etdrs + 1.7 Beck et al. DOI: 10.1016/s0002-9394(02)01825-1

  • Hand movements and counting fingers are converted following Schulze-Bonsel et al. DOI: 10.1167/iovs.05-0981

  • (No) light perception are converted following the suggestions by Michael Bach

Qualitative visual acuity entries

In order to calculate with qualitative entries counting fingers, hand movement and (no) perception of light, use logMAR ! Qualitative visual acuity lower than counting fingers is assigned 0 ETDRS letter, in order to keep it as a measurement (not: NA). It is very difficult to justify a "negative" letter score in a test which only has a specific range (0-100). By default, va recognises the following values (case does not matter!)

  • No light perception := c("nlp", "no light perception", "no light", "no perception of light", "npl"),

  • Light perception: = c("lp", "light perception", "perception of light", "pl"),

  • Hand movements: = c("hm", "handmotion", "hand movement", "hand movements"),

  • Counting fingers: = c("cf", "counting finger", "counting fingers", "finger count", "count fingers")

Custom values for qualitative entries

To define your own values for qualitative entries, you need to pass a names list with names c("cf", "hm", "nlp", "lp") - in that order. It accepts only values that can be reasonably converted into numeric values and it converts only to logMAR. If you want to convert to a different notation, you will need to call va() a second time.

Converting to Snellen

Although there seems to be no good statistical reason to convert back to Snellen, it is a very natural thing to eye specialists to think in Snellen. A conversion to snellen gives a good gauge of how the visual acuity for the patients are. However, back-conversion should not be considered an exact science and any attempt to use formulas will result in very weird Snellen values that have no correspondence to common charts. Therefore, Snellen matching the nearest ETDRS and logMAR value in the VA chart are used.

VA chart

You can find the chart with eye:::va_chart. This chart and VA conversion formulas are based on charts in Holladay et al. DOI: 10.1016/j.jcrs.2004.01.014, Beck et al. DOI: 10.1016/s0002-9394(02)01825-1, and Gregori et al. DOI: 10.1097/iae.0b013e3181d87e04.

The ETDRS values for NLP and PL are deliberately set at those values because they are unlikely to happen by chance as a wrong entry (and as integers), and it has internal reasons that make conversion easier.

Accepted VA formats / Plausibility checks

  • Snellen fractions (meter/ feet) need to be entered as fraction with "/". Any fractions allowed. You can get creative with your snellens. see "Examples"

  • ETDRS must be integer-equivalent between 0 and 100 (integer equivalent means, it can also be a character vector)

  • logMAR must be -0.3 <= x <= 3.0

  • Snellen decimal must be 0 < x <= 2

  • Qualitative must be either of PL, LP, NLP, NPL, HM, CF (any case allowed)

  • Plausibility checks are performed for the automatically or manually defined notation.

  • Any element which is implausible/ not recognized will be converted to NA

Entries with mixed VA notations

Use va_mixed instead.

Snellen "+/-" entries

By default, plus/minus entries are evaluated as intended by the test design: Snellen fractions increase/decrease only by lines.

- if entry -2 to +2 : take same Snellen value
- if < -2 : take Snellen value one line below
- if > +2 : take Snellen value one line above

If smallstep = TRUE, each snellen optotype will be considered equivalent to 0.02 logmar (assuming 5 letters in a row in a chart)

VA cleaning

For more details see clean_va()

  1. NA is assigned to strings such as "." or "", "n/a" or " "

  2. notation for qualitative entries is simplified.

VA classes

Under the hood, convertVA returns a vector that has three classes:

  1. va

  2. One of snellen, snellendec, logmar, etdrs or quali.

  3. Either of character (for Snellen, Snellen decimal, and qualitative), numeric (for logMAR), or integer (for ETDRS).

See Also

Other Ophthalmic functions: va_mixed()

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

Other VA cleaner: clean_va()

Examples

Run this code
## calling va without specifying "to" will clean visual acuity entries
## without conversion into another notation. Weird entries will be
## replaced by a missing value that R recognises as such
x <- c(23, "", NA, "N/A", "Not measured", "20/50", 74, 58)
va(x)

## ... or convert to snellen
va(x, to = "snellen")

## Dealing with those "plus/minus" entries, and qualitative values such as "HM"
va(c("NLP", "NPL", "PL", "LP", "HM", "CF", "6/60", "20/200", "6/9",
 "20/40", "20/40+3", "20/50-2"), to = "snellen")

## A mix of notations is also possible
x <- c("NLP", "0.8", "34", "3/60", "2/200", "20/40+3", "20/50-2")
va(x, to = "snellen")

## Any fraction is possible, and empty values
## change Snellen type to meter with type = "m"
x <- c("CF", "3/60", "2/200", "", "20/40+3", ".", "      ")
va(x, to = "snellen", type = "m")

Run the code above in your browser using DataLab