select.names: Regions of Interest (RoI) indices

select.namesR Documentation

Regions of Interest (RoI) indices

Description

The select.names function allows you to select words from a vector of words, according to several criteria, eliminating spaces and case.

Usage

select.names(names, roi.name = NULL, roi.sname = NULL, roi.idx = NULL)

Arguments

names

Words vector

roi.name

Vector of words to compare to names. By default roi.name = NULL. See Details

roi.sname

Vector of words or parts of words to compare. By default roi.sname = NULL. See Details

roi.idx

Index vector. By default roi.idx = NULL. See Details.

Details

If roi.name, roi.sname, and roi.idx are all NULL, then all RoI are selected.

Value

Returns the indices of the elements of the word vector names satisfying one or more of the following conditions:

  • ASCII // TRANSLIT transcriptions, without spaces, of names and roi.name, are identical.

  • ASCII // TRANSLIT transcriptions, without spaces of roi.sname are identical to part of ASCII // TRANSLIT transcriptions, without spaces of names.

  • names indices belong to the index vector roi.idx.

Examples

# loading patient objects
names <- c ("Eye left", "EyeR", "OPTICAL nerve L", "opical nervR", "chiasma")

# RoI selection.
select.names (names = names, roi.name = c("eye left", "eye right"))
select.names (names = names, roi.sname = c("eye", "ner"))
select.names (names = names, roi.idx = 4:9)

espadon documentation built on April 11, 2025, 5:57 p.m.