labkey.domain.createAndLoad {Rlabkey}R Documentation

Create a new LabKey domain and load data

Description

Create a domain of the type specified by the domainKind. A LabKey domain represents a table in a specific schema. Once the domain is created the data from the data frame will be imported.

Usage

labkey.domain.createAndLoad(baseUrl=NULL, folderPath,
    name, description="", df, domainKind, options=NULL, schemaName=NULL)

Arguments

baseUrl

a string specifying the baseUrl for the labkey server

folderPath

a string specifying the folderPath

name

a string specifying the name of the domain to create

description

(optional) a string specifying the domain description

df

a data frame specifying fields to infer. The data frame must have column names as well as row data to infer the type of the field from.

domainKind

a string specifying the type of domain to create

options

(optional) a list containing options specific to the domain kind

schemaName

(optional) a string specifying the schema name to import the data into

Details

Will create a domain of the specified domain type, valid types are

The options parameter should contain a list of attributes that are specific to the domain kind specified. The list of valid options for each domain kind are:

Value

A list containing the newly uploaded data frame rows.

Author(s)

Karl Lum

See Also

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

Examples

## Not run: 

library(Rlabkey)

## Prepare a data.frame
participants = c("0001","0001","0002","0002","0007","0008")
Visit = c("V1", "V2", "V2", "V1", "V2", "V1")
IntValue = c(256:261)
dataset = data.frame("ParticipantID" = participants, Visit,
    "IntegerValue" = IntValue, check.names = FALSE)

## Create the dataset and import
labkey.domain.createAndLoad(baseUrl="http://labkey", folderPath="home",
    name="demo dataset", df=dataset, domainKind="StudyDatasetVisit")

## End(Not run)

[Package Rlabkey version 3.2.1 Index]