Dataset search: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
imported>Scott
No edit summary
Line 14: Line 14:
: re: = regular expression.
: re: = regular expression.
: si: = sample index.
: si: = sample index.
===Examples===
<pre>load arch
arch.label{2}
ans =
Fe
Ti
Ba
Ca
K
Mn
Rb
Sr
Y
Zr
ca_idx = search(arch,'label',2,1,'ca')
ca_idx =
    0
    0
    0
    1
    0
    0
    0
    0
    0
    0
</pre>


===See Also===
===See Also===
[[dataset_sortby]], [[dataset_sortcols]], [[dataset_sortrows]]
[[dataset_sortby]], [[dataset_sortcols]], [[dataset_sortrows]]

Revision as of 21:40, 5 March 2014

Purpose

Search for given term in a dso field, mode, and set.

Synopsis

out = search(dso_in,fieldname,fieldmode,fieldset,searchterm)

Description

Return 'out' as index of matches. Searches are case insensitive (use "" for case sensitive).

NOTE: If field is numeric then 'searchterm' will be interpreted as numeric expression. First characters can be relational operators.

Search Criteria (TEXT):

* = wildcard (similar to SQL wildcard, not strict RE)
"" = exact match.
re: = regular expression.
si: = sample index.

Examples

load arch

arch.label{2}
ans =
Fe
Ti
Ba
Ca
K
Mn
Rb
Sr
Y
Zr

ca_idx = search(arch,'label',2,1,'ca')
ca_idx =
     0
     0
     0
     1
     0
     0
     0
     0
     0
     0

See Also

dataset_sortby, dataset_sortcols, dataset_sortrows