Learn R Programming

Rlabkey (version 2.8.0)

labkey.domain.createIndices: 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

Value

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

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.

See Also

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

Examples

Run this code
# 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)

# }

Run the code above in your browser using DataLab