View source: R/labkey.moveRows.R
labkey.moveRows | R Documentation |
Specify rows of data to be moved from the LabKey Server
labkey.moveRows(baseUrl, folderPath, targetFolderPath,
schemaName, queryName, toMove, options=NULL)
baseUrl |
a string specifying the |
folderPath |
a string specifying the |
targetFolderPath |
a string specifying the |
schemaName |
a string specifying the |
queryName |
a string specifying the |
toMove |
a data frame containing a single column of data containing the data identifiers of the rows to be moved |
options |
(optional) a list containing options specific to the move action of the query |
Move a set of rows from the source container to a target container for a table. Note that this is not implemented for all tables.
The list of valid options for each query will vary, but some common examples include:
auditBehavior (string)
: Can be used to override the audit behavior for the table the query is acting on.
The set of types include: NONE, SUMMARY, and DETAILED.
auditUserComment (string)
: Can be used to provide a comment from the user that will be attached to
certain detailed audit log records.
A list is returned with named categories of command, rowsAffected, schemaName, queryName, containerPath and updateCounts. The containerPath will be the target container path where the rows were moved. The rowsAffected property indicates the number of rows affected by the API action. This will typically be the same number as passed in the request. The updateCounts property is a list of the number of items moved for various related items.
Cory Nathe
labkey.deleteRows
,
labkey.importRows
,
labkey.importRows
,
labkey.updateRows
,
## Not run:
## Note that users must have the necessary permissions in the LabKey Server
## to be able to modify data through the use of these functions
# library(Rlabkey)
newrow <- data.frame(
DisplayFld="Inserted from R"
, IntFld= 98
, DateTimeFld = "03/01/2010"
, stringsAsFactors=FALSE)
insertedRow <- labkey.insertRows("http://localhost:8080/labkey",
folderPath="/apisamples", schemaName="samples",
queryName="Blood", toInsert=newrow)
newRowId <- insertedRow$rows[[1]]$RowId
result <- labkey.moveRows(baseUrl="http://localhost:8080/labkey",
folderPath="/apisamples", folderPath="/apisamples/subA", schemaName="samples",
queryName="Blood", toMove=data.frame(RowId=c(newRowId)),
options = list(auditUserComment="testing comment from API call", auditBehavior="DETAILED"))
result
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.