saveStatesFromLongFormat: Save states from a long format

View source: R/longFormatSave.R

saveStatesFromLongFormatR Documentation

Save states from a long format

Description

This function saves states to the database specified in applicationSettings

Usage

saveStatesFromLongFormat(entityData, entityKind, stateGroups, idColumn,
  recordedBy, lsTransaction, stateGroupIndices = NULL, testMode = FALSE)

Arguments

entityData

a data.frame, including one column named 'stateGroupIndex', one that matches idColumn, and one of the form 'entityID'

entityKind

a string, the kind of the state, limited to "protocol", "experiment", "analysisgroup", "treatmentgroup", "subject", "container", "itxcontainercontainer"

stateGroups

a list of lists, each of which includes details about how to save states (TODO link later)

idColumn

a string, the name of the column used to separate states (often stateID)

recordedBy

a string, the name of the person recording the data

lsTransaction

an integer, the id of the lsTransaction

stateGroupIndices

an integer vector of indices to use from stateGroups

testMode

A boolean marking if the function should return JSON instead of saving values

Value

A data.frame with columns "entityStateId" and "entityStateVersion", which are often added back to the original data.frame


mcneilco/racas documentation built on April 19, 2024, 1:12 p.m.