Adds extra points between the vertices of the path segments
Usage
densify_paths(
x,
GOF_rank = 10L,
n = 10L,
max_distance = 1,
samples = 100L,
replace = FALSE
)Arguments
- x
either an object of class
"HeFTy"(output ofread_hefty()), or adata.framecontaining thetime,temperature, andComp_GOFcolumns of the modeled paths.- GOF_rank
numeric. Selects only the
GOF_rank-th highest GOF ranked paths. If all GOFs should be used, set toInf. Default is 10.- n
integer. Adds
n(10 by default) equally-spaced extra points along each path segment (between vertices).- max_distance
numeric. Adds points at a maximum distance of
max_distance(in Myr) from each other. 1 by default.- samples
integer or character. Number of random samples of the data. This number should be less or equal then the amount of paths. The default is
100. Paths will be randomly selected after the data has been filtered by theGOF_rank(). Optional, setsamplesto'all'to consider all paths ignoring theGOF_rank()filter (this setsGOFtoInf). SetsamplestoGOFto consider all paths after theGOF_rankfilter.- replace
logical. Should sampling be with replacement?
Note
A large sample number n will require a long(!)
processing time for this function and subsequent methods such as
plot_path_density() or cluster_paths().
If only paths within a specified GOF range should be densified, create a
subset of the data beforehand using either subset() or dplyr::filter().
Examples
data(tT_paths)
densify_paths(tT_paths)
#> # A tibble: 593 × 3
#> time temperature segment
#> <dbl> <dbl> <chr>
#> 1 40 66.5 1
#> 2 39.3 66.3 1
#> 3 38.6 66.1 1
#> 4 37.9 66.0 1
#> 5 37.9 65.0 1
#> 6 37.8 64.1 1
#> 7 37.8 63.1 1
#> 8 37.8 62.2 1
#> 9 37.8 61.2 1
#> 10 37.8 60.3 1
#> # ℹ 583 more rows