dptriml_s: Automatically trim a list of density profiles on the starting...

View source: R/trim.R

dptriml_sR Documentation

Automatically trim a list of density profiles on the starting side

Description

Calls dptrim on a list of dp objects and returns a list of trimmed objects. If automatic detection fails, the dp objects are not trimmed. Can be run in parallel on multiple cores, this speeds up the trimming process significantly. Only trims the starting side, see dptriml for trimming both side simultaneously.

Usage

dptriml_s(dp.list, rreport = FALSE, cl = 1, ...)

Arguments

dp.list

A list of dp objects, see dpload

rreport

Return an embedded report on automatic trim success, mandatory when using correct_failures to manually pick starting/ending.

cl

Number of cores to run the trimming in parallel, passed through to pbapply.

...

Parameters minseglen, span and nroll, will get passed through to dpdetect_s, adjust when profile resolution is not 1/100 of a millimeter.

Value

A list of trimmed dp objects. When rreport = TRUE, it return a two-item list of (i) trimmed dp objects and (ii) trimming report data frame.

See Also

dptrim, dptrim_s, dptriml_s,

Examples


## load several dp files
dp.list <- dpload(dp.directory = system.file("extdata", package = "densitr"))
## trim the measurements
dp.trimmed <- dptriml_s(dp.list)


krajnc/densitr documentation built on April 5, 2022, 7:49 p.m.