Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

labkey.truncateTable

Delete all rows from a table


Description

Delete all rows from the specified table.

Usage

labkey.truncateTable(baseUrl = NULL, folderPath, schemaName, queryName)

Arguments

baseUrl

a string specifying the baseUrl for the labkey server

folderPath

a string specifying the folderPath

schemaName

a string specifying the name of the schema of the domain

queryName

a string specifying the query name

Details

Deletes all rows in the table in a single transaction and will also log a single audit event for the action. Not all tables support truncation, if a particular table doesn't support the action, an error will be returned. The current list of tables supporting truncation include : lists, datasets, issues, sample sets, data classes.

Value

Returns the count of the number of rows deleted.

Author(s)

Karl Lum

See Also

Examples

## create a data frame and infer it's fields
library(Rlabkey)

labkey.truncateTable(baseUrl="http://labkey/", folderPath="home",
    schemaName="lists", queryName="people")

Rlabkey

Data Exchange Between R and 'LabKey' Server

v2.6.0
Apache License 2.0
Authors
Peter Hussey
Initial release
2021-02-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.