if (FALSE) {
## 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
}
Run the code above in your browser using DataLab