From a9bafad4a0c628608f2911fcd32fe04f76338065 Mon Sep 17 00:00:00 2001 From: Tompalski Date: Fri, 3 May 2024 11:31:52 -0700 Subject: [PATCH] fix #23 --- DESCRIPTION | 4 ++-- R/metrics_voxels.R | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8cb0ad8..a57b686 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: lidRmetrics -Title: Suplemetary point cloud metrics. -Version: 0.1.2 +Title: Point cloud metrics for the lidR package. +Version: 0.1.3 Authors@R: c( person("Piotr", "Tompalski", email = "piotr.tompalski@gmail.com", role = c("aut", "cre")), person("Jean-Romain", "Roussel", email = "", role = c("ctb")), diff --git a/R/metrics_voxels.R b/R/metrics_voxels.R index 702b815..76673db 100644 --- a/R/metrics_voxels.R +++ b/R/metrics_voxels.R @@ -47,7 +47,7 @@ metrics_voxels <- function(x, y, z, vox_size=1, zmin = NA) { vn <- NA_integer_ vFRall <- vFRcanopy <- NA_real_ - if (length(z) > 2) { + # if (length(z) > 2) { vox <- lidRmetrics:::create_voxels(x = x, y = y, z = z, vox_size = vox_size, zmin = zmin) @@ -76,12 +76,12 @@ metrics_voxels <- function(x, y, z, vox_size=1, zmin = NA) { mlefsky <- lidRmetrics:::metrics_lefsky(x = vox$X, y = vox$Y, z = vox$Z, n=vox$n) - } else { - - mhist <- lidRmetrics:::metrics_voxstructure(z = NA) #this is temporary fix - mlefsky <- lidRmetrics:::metrics_lefsky(x = NA, y = NA, z = NA, n=NA) #this is temporary fix - - } + # } else { + # + # mhist <- lidRmetrics:::metrics_voxstructure(z = NA) #this is temporary fix + # mlefsky <- lidRmetrics:::metrics_lefsky(x = NA, y = NA, z = NA, n=NA) #this is temporary fix + # + # } output = list(vn = vn,