Learn R Programming

nat (version 1.8.24)

all.equal.neuron: Check equality on key fields of neuron object

Description

Check equality on key fields of neuron object

Usage

# 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

Run this code
x=Cell07PNs[[1]]
y=x
y$NeuronName='rhubarb'
# NOT TRUE
all.equal(x, y)
# TRUE
all.equal(x, y, fieldsToExclude='NeuronName')

Run the code above in your browser using DataLab