Description Usage Arguments Value Examples
View source: R/Isobole_gridRefinementAlgorithm.R
Calculate the isobole path length
1 | getPathlength(iso, FLAGreturnDT = FALSE)
|
iso |
data.table(xp,yp, ...) |
FLAGreturnDT |
FALSE: return total path length (numeric) TRUE: Return data.table(xp,yp, distToNext, cumDist, totDist, ...) |
Depends on FLAGreturnDT: TRUE: data.table, FALSE: numeric(1L)
1 2 3 4 5 6 7 8 9 10 | iso_unordered <- data.frame(
xp = c(00, 10, 10, 20, 30, 40, 50, 50, 50, 50, 60, 60, 60, 50, 50, 50),
yp = c(80, 80, 70, 60, 60, 70, 70, 60, 50, 40, 30, 40, 20, 20, 10, 0)
)
set.seed(1)
iso_unordered <- iso_unordered[sample(1:nrow(iso_unordered), nrow(iso_unordered)),]
iso_unordered <- data.table(iso_unordered)
iso_ordered <- populationIsoboles:::arrange_isobole_internal(iso_unordered)
populationIsoboles:::getPathlength(iso_unordered)
populationIsoboles:::getPathlength(iso_ordered)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.