Homogenize a given point cloud from any tabular format to a 3-column matrix.
Source:R/cloud_to_mat.R
cloud_to_mat.RdTurns any tabular data (data.frame, matrix, tibble) into a 3-column matrix. This format is used throughout this package. Additional columns other than x, y, z will be removed. Simple tabular data such as xyz point clouds are computed multiples faster within algorithms in R when compared against data.frames and friends.
Examples
sphere <- gen_sphere(1, 0.05)
sphere <- as.data.frame(sphere)
sphere$extra_data <- 1
sphere_mat <- cloud_to_mat(sphere, "xy")
#> Error in cloud_to_mat(sphere, "xy"): could not find function "cloud_to_mat"