set_eye_strings: Set list of codes

Description Usage Arguments Examples

View source: R/str_helper.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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"),
  quali = c("nlp", "lp", "hm", "cf"),
  ...
)

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

quali

quali VA codes

...

currently not used, but might be needed in the future

Examples

1
2
3
4
5
# 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()

eye documentation built on Sept. 5, 2021, 5:25 p.m.