Learn R Programming

AMAPVox (version 2.2.1)

Extract: Extract or Replace Parts of a VoxelSpace Object

Description

Operators acting on VoxelSpace object. If user attempts

Usage

# S4 method for VoxelSpace
$(x, name)

# S4 method for VoxelSpace,ANY,missing [[(x, i, j, ...)

# S4 method for VoxelSpace $(x, name) <- value

# S4 method for VoxelSpace,ANY,missing [[(x, i, j) <- value

# S4 method for VoxelSpace $(x, name) <- value

Arguments

x

a VoxelSpace object

name

A literal character string or a name (possibly backtick quoted).

i

string, name of elements to extract.

j

Unused.

...

Unused.

value

typically an array-like R object of a similar class as x.

Examples

Run this code
# load a voxel file
vxsp <- readVoxelSpace(system.file("extdata", "tls_sample.vox", package = "AMAPVox"))

# extract columns or header parameters
vxsp$nbSampling
vxsp[["i"]]
vxsp[["mincorner"]]

if (FALSE) {
# add new column
vxsp[["pad_capped"]] <- ifelse(vxsp$PadBVTotal > 0.5, 0.5, vxsp$PadBVTotal)
# update header parameter
vxsp[["max_pad"]] <- 0.5
}

Run the code above in your browser using DataLab