Skip to contents

Retrieve the IDs for any VecDyn datasets matching the given filter.

Usage

search_vd_smart(field, operator, value, basereq = NA)

Arguments

field

a field of VecDyn to search.

operator

an operator to use when searching.

value

the value that the field might/might not be.

basereq

an httr2 request object, as generated by vb_basereq(). If NA, uses the default request.

Value

An ohvbd.ids vector of VecDyn dataset IDs.

Valid fields

The following field names are valid (shortcut names are listed in brackets):

  • SpeciesName (species)

  • Title

  • Collections

  • Years (yrs)

  • CollectionMethods (methods)

Valid operators

The following operators are valid (alternative names are listed in brackets):

  • contains (contain, has, have)

  • !contains (!contains, !has, !have, ncontains)

  • equals (=, ==, equal, eq)

  • !equals (!=, not, !equal, !eq, neq)

  • starts (starts with, start with, start, sw)

  • !starts (not starts with, not start with, !start, nsw)

  • in (within)

  • !in (not in, not within, !within, nin)

  • greater (greater than, gt, >)

  • less (less than, lt, <)

Author

Francis Windram

Examples

if (FALSE) { # \dontrun{
search_vd_smart("Collections", "gt", "1000")
} # }