select.names {espadon}R 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:

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)

[Package espadon version 1.6.0 Index]