R/hash.R

Defines functions hash

Documented in hash

# -----------------------------------------------------------------------------
# CONSTRUCTOR: hash
#   Takes an optional 1 or two parameter
#   DEPENDS on method set
# -----------------------------------------------------------------------------
hash <- function( ... ) {

  li <- list(...)  

  # INITIALIZE A NEW HASH   
  h <- new( 
    "hash" , 
     new.env( hash = TRUE , parent=emptyenv() )  
  )

  if ( length(li) >  0  ) { 
    if( length(li) > 0 ) .set( h, ... )
  }

  return(h)

}
	

Try the hash package in your browser

Any scripts or data that you put into this service are public.

hash documentation built on Aug. 20, 2023, 1:08 a.m.