scale.neuron: Scale and centre neuron 3D coordinates

View source: R/neuron.R

scale.neuronR Documentation

Scale and centre neuron 3D coordinates

Description

note that scale.dotprops recalculates the tangent vectors after scaling the 3D coords. See dotprops for details.

Usage

## S3 method for class 'neuron'
scale(x, center = TRUE, scale = TRUE)

## S3 method for class 'dotprops'
scale(x, center = TRUE, scale = TRUE)

Arguments

x

A neuron

center

3-vector to subtract from x,y,z coords

scale

3-vector used to divide x,y,z coords

Details

If scale=TRUE, the neuron will be rescaled to unit sd in each axis. If center=TRUE, the neuron will be centred around the axis means. See base::scale.default for additional details.

Value

neuron with scaled coordinates

See Also

scale.default, *.neuron

Examples

n1.scaledown=scale(Cell07PNs[[1]],scale=c(2,2,3))
n1.scaleup=scale(Cell07PNs[[1]],scale=1/c(2,2,3))

nat documentation built on May 29, 2024, 10:36 a.m.