haskey.h: Does a Key Exist in a Hash

Description Usage Arguments Value Author(s) Examples

Description

This function determines the presence of a key in a hash.

Usage

1
haskey.h(key, hash)

Arguments

key

A key for the hash, which will be cast into as.character().

hash

An R environment but for purposes here a hash.

Value

The function returns TRUE or FALSE depending upon the presence of the key in the hash.

Author(s)

W.H. Asquith, Spring 2009

Examples

1
2
3
4
my.new.hash <- new.h()
set.h("author",  "william", my.new.hash)
haskey.h("publisher", my.new.hash)
haskey.h("author", my.new.hash)

wasquith-usgs/rash documentation built on May 29, 2019, 10:31 a.m.