remove_data {globaltrends}R Documentation

Remove data from database tables

Description

The function removes data from database tables for control or object batches.

Usage

remove_data(table, control = NULL, object = NULL)

vacuum_data()

Arguments

table

Database table from which the batch should be removed. Object of type character.

control

Control batch for which the data is removed Object of type numeric.

object

Object batch for which the data is removed Object of type numeric.

Details

The function removes data "greedily": all data that builds on the deleted data is removed. For example, when data from data_control is removed data in data_object that maps to this control batch is also removed. The dependency structure works as follows: batch_keyword / batch_time -> data_control -> data_object -> data_score -> data_doi.

After using remove_data, run vacuum_data to free-up unused memory in the database file. Depending on the database size, vacuum_data might take some minutes for execution.

Value

Message that data has been removed successfully. Data is removed from database tables.

See Also

Examples

## Not run: 
remove_data(
  table = "batch_keywords",
  control = 1
)
remove_data(
  table = "data_score",
  control = 1,
  object = 1
)
vacuum_data()

## End(Not run)


[Package globaltrends version 0.0.14 Index]