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

Description Usage Arguments See Also Examples

View source: R/neuron.R

Description

Check equality on key fields of neuron object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S3 method for class '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 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

all.equal

Examples

1
2
3
4
5
6
7
x=Cell07PNs[[1]]
y=x
y$NeuronName='rhubarb'
# NOT TRUE
all.equal(x, y)
# TRUE
all.equal(x, y, fieldsToExclude='NeuronName')

nat documentation built on Sept. 6, 2021, 5:09 p.m.