twilight_label_read: Read a twilight label file

View source: R/twilight_label_read.R

twilight_label_readR Documentation

Read a twilight label file

Description

This function read an exported csv file from TRAINSET https://trainset.raphaelnussbaumer.com/ and update the twilight data tag$twilight.

Usage

twilight_label_read(
  tag,
  file = glue::glue("./data/twilight-label/{tag$param$id}-labeled.csv")
)

Arguments

tag

a GeoPressureR tag object

file

csv file of the labels to be read.

Value

Same tag object, updated with the labels tag$twilight$label.

See Also

Other geolight: geolight_map(), twilight_create(), twilight_label_write()

Examples

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

  tag_labelled <- twilight_label_read(tag)
})

plot(tag, type = "twilight") + ggplot2::ggtitle("Before label")

str(tag_labelled$twilight)

plot(tag_labelled, type = "twilight") + ggplot2::ggtitle("After label")

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