Skip to contents

Force an object to appear to come from a specific database

Usage

force_db(x, db)

Arguments

x

Object to force.

db

Database to apply to x.

Value

Object with the "db" attribute set to db

Note

DO NOT use this function to create ids to feed into fetch()!

Objects created in this way may lack vital underlying data required later. Instead use ohvbd.ids() for this purpose.

Author

Francis Windram

Examples

force_db(c(1,2,3), "vt")
#> [1] 1 2 3
#> attr(,"db")
#> [1] "vt"