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 |
roi.sname |
Vector of words or parts of words to compare. By default
|
roi.idx |
Index vector. By default |
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
androi.name
, are identical.ASCII // TRANSLIT transcriptions, without spaces of
roi.sname
are identical to part of ASCII // TRANSLIT transcriptions, without spaces ofnames
.-
names
indices belong to the index vectorroi.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)