View source: R/labkey.storage.R
labkey.storage.delete | R Documentation |
Delete an existing LabKey Freezer Manager storage item. Note that deletion of freezers, primary storage, or locations within the storage hierarchy will cascade the delete down the hierarchy to remove child locations and terminal storage locations. Samples in the deleted storage location(s) will not be deleted but will be removed from storage. Storage items can be of the following types: Physical Location, Freezer, Primary Storage, Shelf, Rack, Canister, Storage Unit Type, or Terminal Storage Location.
labkey.storage.delete(baseUrl=NULL, folderPath, type, rowId)
baseUrl |
a string specifying the |
folderPath |
a string specifying the |
type |
a string specifying the type of storage item to delete |
rowId |
the primary key of the storage item to delete |
A list containing a data element with the property values for the deleted storage item.
Cory Nathe
labkey.storage.create
,
labkey.storage.update
## Not run:
library(Rlabkey)
## delete a freezer and its child locations and terminal storage locations
freezer <- labkey.storage.create(
baseUrl="http://labkey/",
folderPath="home",
type="Freezer",
props=list(name="Test Freezer", description="My example storage freezer")
)
shelf = labkey.storage.create(
baseUrl="http://labkey/",
folderPath="home",
type="Shelf",
props=list(name="Test Shelf", locationId=freezer$data$rowId )
)
plateType = labkey.storage.create(
baseUrl="http://labkey/",
folderPath="home",
type="Storage Unit Type",
props=list(name="Test 8X12 Well Plate", unitType="Plate", rows=8, cols=12 )
)
plate1 = labkey.storage.create(
baseUrl="http://labkey/",
folderPath="home",
type="Terminal Storage Location",
props=list(name="Plate #1", typeId=plateType$data$rowId, locationId=shelf$data$rowId )
)
plate2 = labkey.storage.create(
baseUrl="http://labkey/",
folderPath="home",
type="Terminal Storage Location",
props=list(name="Plate #2", typeId=plateType$data$rowId, locationId=shelf$data$rowId )
)
# NOTE: this will delete freezer, shelf, plate1 and plate2 but it will not delete
# the plateType as that is not a part of the freezer hierarchy
freezer <- labkey.storage.delete(
baseUrl="http://labkey/",
folderPath="home",
type="Freezer",
rowId=freezer$data$rowId
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.