Learn R Programming

eye (version 1.3.0)

set_eye_strings: Set list of codes

Description

This sets the list of codes used throughout the eye package for the coding of all kind of stuff. If you want to change recognized codes, this is the place to do it. See examples below how to easily overwrite it. It is important that you must pass them as a character vector!

cases are always ignored, so you don't need to worry about this bit.

Usage

set_eye_strings(
  right = c("r", "re", "od", "right"),
  left = c("l", "le", "os", "left"),
  both = c("b", "both", "ou"),
  iop = c("iop", "gat", "nct"),
  iop_partial = c("pressure"),
  va = c("va", "bcva"),
  va_method = c("etdrs", "snellen", "logmar"),
  va_partial = c("acuit"),
  id = c("pat", "id"),
  eye = c("eye", "eyes"),
  nlp = c("nlp", "no light perception", "no light", "no perception of light", "npl"),
  lp = c("lp", "light perception", "perception of light", "pl"),
  hm = c("hm", "handmotion", "hand movement", "hand movements"),
  cf = c("cf", "counting finger", "counting fingers", "finger count", "count fingers"),
  ...
)

Arguments

right

right eyes

left

left eyes

both

both eyes

iop

IOP codes

iop_partial

partial strings used to find IOP columns

va

VA codes

va_method

VA methods (used to recognize VA columns - when those strings occur "fully", i.e., not as part of sth else)

va_partial

Also used to find VA columns - looking for partial strings

id

patient column codes

eye

eye column codes

nlp

VA values recognised as "No light perception"

lp

VA values recognised as "light perception"

hm

VA values recognised as "hand movement"

cf

VA values recognised as "count fingers"

...

currently not used, but might be needed in the future

Restoring the defaults

To restore the defaults, simply call set_eye_strings empty

Details

Beware, setting the recognised strings will fully overwrite previously recognised ones. If you want to keep all, you need to write them all out.

Examples

Run this code
# To expand recognized codes for eyes, e.g. if you want to use French names
set_eye_strings(right = c("droit", "od"), left = c("gauche", "og"))

# To restore the defaults, simply call set_eye_strings empty
set_eye_strings()

Run the code above in your browser using DataLab