R/xform.R
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.
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
x | object containing 3D coordinates |
---|---|
... | additional arguments passed to methods |
y, z | separate y and z coordinates |
value | Nx3 matrix specifying new xyz coords |
For xyzmatrix
: Nx3 matrix containing 3D coordinates
For xyzmatrix<-
: Original object with modified coords
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.
xyzmatrix
# see all available methods for different classes methods('xyzmatrix')#> [1] xyzmatrix.default xyzmatrix.dotprops xyzmatrix.hxsurf #> [4] xyzmatrix.igraph xyzmatrix.mesh3d xyzmatrix.neuron #> [7] xyzmatrix.neuronlist #> see '?methods' for accessing help and source code# ... and for the assignment method methods('xyzmatrix<-')#> [1] xyzmatrix<-.default xyzmatrix<-.dotprops xyzmatrix<-.hxsurf #> [4] xyzmatrix<-.igraph xyzmatrix<-.neuron xyzmatrix<-.neuronlist #> [7] xyzmatrix<-.shape3d #> see '?methods' for accessing help and source coden=Cell07PNs[[1]] xyzmatrix(n)<-xyzmatrix(n) stopifnot(isTRUE( all.equal(xyzmatrix(n),xyzmatrix(Cell07PNs[[1]])) ))