Constructor for creating a single measurement object containing location (e.g., wavelength, retention time) and value pairs.
See also
new_measure_list() for creating collections of measurements,
is_measure_tbl() for checking object class.
Examples
# Create a simple spectrum
spec <- new_measure_tbl(
location = seq(1000, 1100, by = 10),
value = sin(seq(1000, 1100, by = 10) / 50)
)
spec
#> <measure_tbl [11 x 2]>
#> # A tibble: 11 × 2
#> location value
#> <dbl> <dbl>
#> 1 1000 0.913
#> 2 1010 0.976
#> 3 1020 1.000
#> 4 1030 0.984
#> 5 1040 0.929
#> 6 1050 0.837
#> 7 1060 0.711
#> 8 1070 0.557
#> 9 1080 0.381
#> 10 1090 0.190
#> 11 1100 -0.00885