Check equality on key fields of neuron object

# S3 method for neuron
all.equal(target, current, tolerance = 1e-06,
  check.attributes = FALSE, fieldsToCheck = c("NumPoints",
  "StartPoint", "BranchPoints", "EndPoints", "NumSegs", "SegList", "d"),
  fieldsToCheckIfPresent = c("NeuronName", "nTrees", "SubTrees"),
  fieldsToExclude = character(), CheckSharedFieldsOnly = FALSE, ...)

Arguments

target

R object.

current

other R object, to be compared with target.

tolerance

numeric \(\ge\) 0. Differences smaller than tolerance are not reported. The default value is close to 1.5e-8.

check.attributes

logical indicating if the attributes of target and current (other than the names) should be compared.

fieldsToCheck

Which fields in the neuron are always checked. The special value of NA indicates that all fields in the neurons will be compared.

fieldsToCheckIfPresent

These fields are only checked if they are present

fieldsToExclude

Character vector of fields to exclude from check

CheckSharedFieldsOnly

Logical whether to check shared fields only (default: FALSE)

...

additional arguments passed to all.equal

See also

Examples

x=Cell07PNs[[1]] y=x y$NeuronName='rhubarb' # NOT TRUE all.equal(x, y)
#> [1] "Component “NeuronName”: 1 string mismatch"
# TRUE all.equal(x, y, fieldsToExclude='NeuronName')
#> [1] TRUE