Learn R Programming

TreeLS (version 1.0)

randomize: Point sampling algorithm: random sample

Description

This function is meant to be used inside tlsSample. It selects points randomly, returning a fraction of the input point cloud.

Usage

randomize(p = 0.5)

Arguments

p

numeric - between 0 and 1 - proportion of points to keep.

Examples

Run this code
# NOT RUN {
file = system.file("extdata", "pine.laz", package="TreeLS")
tls = readTLS(file)
print(tls)

### thin point cloud - note the point count
tls = tlsSample(tls, randomize(0.33))
print(tls)

# }

Run the code above in your browser using DataLab