Learn R Programming

Rlabkey (version 3.3.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)

Value

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

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

Author

Cory Nathe

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
if (FALSE) {

## 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