meltBatchCodes: Turns a batchCode column into rows in a long format

View source: R/longFormatSave.R

meltBatchCodesR Documentation

Turns a batchCode column into rows in a long format

Description

Turns a batchCode column into rows in a long format

Usage

meltBatchCodes(entityData, batchCodeStateIndices,
  replacedFakeBatchCode = NULL, optionalColumns = c("treatmentGroupID",
  "analysisGroupID", "stateVersion"))

Arguments

entityData

a data frame with data

batchCodeStateIndices

a numeric vector of indices in the stateGroupIndexColumn which should have batchCodes melted

replacedFakeBatchCode

deprecated: a character vector of fake batch id's that were replaced, marking invalid batch codes

optionalColumns

Columns to include in output (if available). Often the entityID is needed for saving later

Details

Does not work with data.table. entityData must have columns "batchCode", "stateID", "stateGroupIndex". If "batchCode" is missing, will return an empty data.frame. publicData is always set to TRUE. In longFormatSave.R

Value

A data frame with rows for all code values


mcneilco/racas documentation built on June 15, 2025, 5:20 a.m.