This function writes the csv file of labelled activity and pressure which can be read with TRAINSET. If no label data exist, it will first initialize the label data.
Optionally, it can also export a reference dataset for pressure tag$pressure$ref
as another
series to be visualized on TRAINSET, but without impacting the labelling process.
Usage
tag_label_write(
tag,
file = glue::glue("./data/tag-label/{tag$param$id}.csv"),
quiet = FALSE
)
Arguments
- tag
a GeoPressure
tag
object.- file
Absolute or relative path of the label file to be saved.
- quiet
logical to display message.
See also
Other tag_label:
tag_label()
,
tag_label_auto()
,
tag_label_read()
,
tag_label_stap()
Examples
setwd(system.file("extdata", package = "GeoPressureR"))
tag <- tag_create("18LX", quiet = TRUE)
# Writing unlabelled tag will initialize the labelling for trainset
tag_label_write(tag)
#> ℹ No label data.
#> → Initialize automatically label using `tag_label_auto()`
#> ✔ ./data/tag-label/18LX.csv written successfully.
# Writing unlabelled tag will initialize the labelling for trainset
tag <- tag_label_auto(tag)
tag_label_write(tag)
#> ✔ ./data/tag-label/18LX.csv written successfully.
# Writing labelled tag will use the existing labels
tag <- tag_label(tag)
#>
#> ── Short stationary periods (<6hr):
#> ✔ All 5 stationary periods duration are above 6 hours.
#>
#> ── Short flights (<2hr):
#> ✔ All 4 flights duration are above 2 hours.
tag_label_write(tag)
#> ✔ ./data/tag-label/18LX.csv written successfully.