tag_label_write: Write a tag label file

View source: R/tag_label_write.R

tag_label_writeR Documentation

Write a tag label file

Description

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.

Value

The file pathname is return invisibly

See Also

GeoPressureManual

Other tag_label: tag_label(), tag_label_auto(), tag_label_read(), tag_label_stap()

Examples

withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
  tag <- tag_create("18LX", quiet = TRUE)

  # Writing unlabelled tag will initialize the labelling for trainset
  tag_label_write(tag)

  # Writing unlabelled tag will initialize the labelling for trainset
  tag <- tag_label_auto(tag)
  tag_label_write(tag)

  # Writing labelled tag will use the existing labels
  tag <- tag_label(tag)
  tag_label_write(tag)
})


Rafnuss/GeoPressureR documentation built on April 17, 2025, 12:58 p.m.