Deletes records from the given table. The data is a vector of record IDs.
delete_records(api, table_id, record_ids)TRUE if the transaction was successful.
Other function_gristapi:
add_records(),
countrows(),
fetch_table(),
listcolumns(),
listtables(),
sync_table(),
update_records()
# delete data in a given table
table_name <- paste0("Mtcars_",get_os())
api <- grist_api$new(
server = 'https://grist.numerique.gouv.fr',
api_key = Sys.getenv("GRIST_KEY"),
doc_id = Sys.getenv("GRIST_DOC_TEST")
)
delete_records(api, table_name, as.integer(c(6)))
#> [1] TRUE