item_rm: Remove item from SB

View source: R/item_rm.R

item_rmR Documentation

Remove item from SB

Description

Remove an item from ScienceBase. This is not reversible and will delete an item and its attached files. (advanced) Recursive is to be used with care and could result in unexpected file deletion.

Usage

item_rm(sb_id, ..., limit = 1000, recursive = FALSE)

Arguments

sb_id

An sbitem object or a character ScienceBase ID corresponding to the item

...

Additional parameters are passed on to GET, POST, HEAD, PUT.

limit

The maximum number of child items to remove when called with recursive=TRUE.

recursive

logical, FALSE by default. CAUTION: setting recursive=TRUE means that not only will this item be deleted, but so will all its child items and their child items and so on.

Value

httr response object

Examples

## Not run: 
res <- item_create(user_id(), "item-to-delete")
item_rm(res)

## End(Not run)

USGS-R/sbtools documentation built on Feb. 21, 2024, 10:15 a.m.