Learn R Programming

eye (version 1.0.0)

getElem: Find element based or strings

Description

Finds the element in an object for one of the following:

  • ID

  • eye

  • Visual acuity

getElem search a vector, the column names (data frame) or the names (list)

Finds the element in an object for one of the following:

  • ID column

  • eye column

  • columns that contain information for right/left eyes

  • Visual acuity

getElem search a vector, the column names (data frame) or the names (list)

Usage

getElem_id(obj, id_chr)

getElem_eyecol(obj)

getElem_eye(obj, eye_chr)

getElem_va(obj, va_chr)

getElem_iop(obj, iop_chr)

Arguments

obj

can be vector, data frame or list

id_chr

strings to identify ID colums.

eye_chr

named list with strings for "r" and "l" names have to be "r" and "l"!

va_chr

named list with strings for "whole" and "part" names have to be "whole" and "part"!

iop_chr

named list with strings for "whole" and "part" names have to be "whole" and "part"!

Value

vector

vector

See Also

Other string matching functions: recodeye(), set_codes(), sort_substr(), str_func_facs

Other string matching functions: recodeye(), set_codes(), sort_substr(), str_func_facs