labkey.domain.createIndices: Helper function to create a domain design indices list

View source: R/labkey.domain.R

labkey.domain.createIndicesR Documentation

Helper function to create a domain design indices list

Description

Create a list of indices definitions which can then be used by labkey.domain.createDesign

Usage

labkey.domain.createIndices(colNames, asUnique, existingIndices = NULL)

Arguments

colNames

a list of string column names for the index

asUnique

a logical TRUE or FALSE value for if a UNIQUE index should be used

existingIndices

a list of previously created indices definitions to append to

Details

This helper function can be used to construct the list of indices definitions for a domain design structure. Each call to this function takes in the column names from the domain to use in the index and a parameter indicating if this should be a UNIQUE index. A third parameter can be used to build up more then one indices definitions.

Value

The data frame containing the list of indices definitions, concatenated with the existingIndices object if provided.

Author(s)

Cory Nathe

See Also

labkey.domain.get, labkey.domain.create, labkey.domain.createDesign, labkey.domain.inferFields, labkey.domain.save, labkey.domain.drop

Examples

## Not run: 

## create a list of indices definitions to use for a domain design
library(Rlabkey)

indices = labkey.domain.createIndices(list("intKey", "customInt"), TRUE)
indices = labkey.domain.createIndices(list("customInt"), FALSE, indices)


## End(Not run)

Rlabkey documentation built on Oct. 23, 2024, 5:06 p.m.