Append mass spectrometer metadata to the raw data.
add_info(.data, .info, cols = NULL, ..., quiet = NULL)
A tibble, resulting from
collapse_cycles()
.
A tibble, resulting from
clean_did_info()
.
A character vector with column names in info to add to the data.
These dots are for future extensions and must be empty.
If TRUE
, print info messages. If NULL
(default) listens to options(clumpedr.quiet)
Same as .data
but with new columns in cols
.
dplyr::left_join()
for the function that does the matching.
Other metadata cleaning functions:
clean_did_info()
,
get_inits()
,
parse_info()
# generate some artificial data
dat <- tibble::tibble(file_id = c("hi", "bye"), Analysis = c(1, 2))
# and artificial metadata
inf <- tibble::tibble(file_id = c("hi", "bye"), Analysis = c(1, 2),
file_path = c("/path/to/file", "/path/to/file"),
weight = c(69, 87), )
dat <- dat |>
add_info(inf, c("weight", "file_path"))
#> Info: appending measurement information.