ll_add_experiment_devices: Link device to experiment

View source: R/db_write.R

ll_add_experiment_devicesR Documentation

Link device to experiment

Description

Note that for the same device, experiment and index, only one record can exist. If the same one is added again, it will simply update the existing one to be active (in case it is not).

Usage

ll_add_experiment_devices(
  exp_id,
  device_names,
  data_idxs,
  device_ids = ll_get_device_ids(device_names, quiet = quiet),
  experiment_devices = tibble(exp_id, device_id = device_ids, data_idx = data_idxs),
  group_id = default(group_id),
  con = default(con),
  quiet = default(quiet)
)

Arguments

exp_id

the unique identifier of the experiment (usually a few letter code). Has to exist already in the data base.

device_names

names of the device(s) to link (define alternatively to the device id, will determine device_ids internally)

data_idxs

the data indices to map for the experiment, must be same length as device_names/device_ids

device_ids

one or multiple device ids to add (by default is inferred from the device names)

experiment_devices

alternatively provide experiment devices as a data frame right away


KopfLab/lablogger documentation built on July 6, 2023, 12:03 a.m.