ndigest: Calculated normalised digest value for an object

View source: R/ndigest.R

ndigestR Documentation

Calculated normalised digest value for an object

Description

The normalised digest should exclude any fields or attributes irrelevant to the core contents of the object (e.g. timestamps, absolute location of the input files on disk etc). In theory then, this value should be constant for the same data regardless of the particular machine on which the digest is being computed.

Usage

ndigest(x, ...)

## S3 method for class 'neuronlistfh'
ndigest(x, ...)

## S3 method for class 'dotprops'
ndigest(x, absoluteVectors = TRUE, ...)

## S3 method for class 'neuron'
ndigest(
  x,
  fieldsToExclude = c("InputFileName", "CreatedAt", "NodeName", "InputFileStat",
    "InputFileMD5"),
  ...
)

Arguments

x

Object for which a normalised digest will be computed.

...

Additional arguments passed to methods and then on to digest

absoluteVectors

Whether to check only the absolute value of eigenvectors for equality (default TRUE, see details)

fieldsToExclude

Character vector naming the neuron fields to exclude

Details

ndigest.neuronlistfh only considers the keyfilemap and df (metadata data.frame) when computing the hash value. See neuronlistfh for the significance of these two fields.

ndigest.dotprops ignores any mtime or file attributes. It also converts tangent vectors to absolute values (when absoluteVectors=TRUE) because the direction vectors are computed using an eigenvector decomposition where the sign of the eigenvector is essentially random and subject to small numerical instabilities. Therefore it does not usually make sense to rely on the value of vect exactly.

ndigest.neuron ignores the following fields:

  • InputFileName

  • CreatedAt

  • NodeName

  • InputFileStat

  • InputFileMD5

Value

A character string containing the digest of the supplied object computed by digest.

See Also

digest

all.equal.dotprops

all.equal.neuron

Examples

stopifnot(all.equal(ndigest(kcs20[[1]]), "4c045b0343938259cd9986494fc1c2b0"))

natverse/nat documentation built on Feb. 19, 2024, 7:19 a.m.