Learn R Programming

nat (version 1.8.24)

xyzmatrix: Get and assign coordinates for classes containing 3D vertex data

Description

xyzmatrix gets coordinates from objects containing 3D vertex data

xyzmatrix<- assigns xyz elements of neuron or dotprops object and can also handle matrix like objects with columns named X, Y, Z or x, y, z.

Usage

xyzmatrix(x, ...)

# S3 method for default xyzmatrix(x, y = NULL, z = NULL, ...)

# S3 method for neuron xyzmatrix(x, ...)

# S3 method for neuronlist xyzmatrix(x, ...)

# S3 method for dotprops xyzmatrix(x, ...)

# S3 method for hxsurf xyzmatrix(x, ...)

# S3 method for igraph xyzmatrix(x, ...)

# S3 method for mesh3d xyzmatrix(x, ...)

xyzmatrix(x) <- value

# S3 method for neuron xyzmatrix(x) <- value

# S3 method for dotprops xyzmatrix(x) <- value

# S3 method for hxsurf xyzmatrix(x) <- value

# S3 method for igraph xyzmatrix(x) <- value

# S3 method for shape3d xyzmatrix(x) <- value

# S3 method for neuronlist xyzmatrix(x) <- value

Value

For xyzmatrix: Nx3 matrix containing 3D coordinates

For xyzmatrix<-: Original object with modified coords

Arguments

x

object containing 3D coordinates

...

additional arguments passed to methods

y, z

separate y and z coordinates

value

Nx3 matrix specifying new xyz coords

Details

Note that xyzmatrix can extract or set 3D coordinates in a matrix or data.frame that either has exactly 3 columns or has 3 columns named X,Y,Z or x,y,z.

See Also

xyzmatrix

Examples

Run this code
# see all available methods for different classes
methods('xyzmatrix')
# ... and for the assignment method
methods('xyzmatrix<-')
n=Cell07PNs[[1]]
xyzmatrix(n)<-xyzmatrix(n)
stopifnot(isTRUE(
  all.equal(xyzmatrix(n),xyzmatrix(Cell07PNs[[1]]))
))

Run the code above in your browser using DataLab