Extract {AMAPVox}R Documentation

Extract or Replace Parts of a VoxelSpace Object

Description

Operators acting on VoxelSpace object. If user attempts

Usage

## S4 method for signature 'VoxelSpace'
x$name

## S4 method for signature 'VoxelSpace,ANY,missing'
x[[i, j, ...]]

## S4 replacement method for signature 'VoxelSpace'
x$name <- value

## S4 replacement method for signature 'VoxelSpace,ANY,missing'
x[[i, j]] <- value

## S4 replacement method for signature '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

# 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"]]

## Not run: 
# add new column
vxsp[["pad_capped"]] <- ifelse(vxsp$PadBVTotal > 0.5, 0.5, vxsp$PadBVTotal)
# update header parameter
vxsp[["max_pad"]] <- 0.5

## End(Not run)


[Package AMAPVox version 2.2.1 Index]