Description Usage Arguments Value Author(s) See Also Examples
Gets the index of one or more spots from their name or id.
1 2 |
name |
A string |
id |
A string |
plate |
A string |
ignoreCase |
If |
regexpr |
If |
At least one of the arguments name
and id
must be given.
If both are given, indices of spots that match either the
name
search pattern or the id
search pattern.
Returns the vector
of indices of matched names or ids. Returns
numeric(0)
if no matches were found.
Henrik Bengtsson (http://www.braju.com/R/)
For more help on regular expressions see
grep
() and apropos
.
*getName()
.
*getId()
.
For more information see Layout
.
1 2 3 4 5 6 7 8 9 10 11 | SMA$loadData(c("mouse.setup", "mouse.gnames"))
layout <- as.Layout(mouse.setup, id=mouse.gnames)
# Get the index of spots with id "54" and "232".
indexOf(layout, id=c("54", "232"))
# [1] 54 232
# Get the index of all spots with id beginning with "120" and
# having at least four characters.
indexOf(layout, id="^120.+", regexpr=TRUE)
# [1] 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.