db <- autodb(ChickWeight)
db
add_lookup(db, "Time")
add_lookup(db, "Chick") # Chick is already a key, so this does nothing
# data objects round numeric and complex values before checking given values
add_lookup(db, "weight", digits = 3)
if (FALSE) add_lookup(c(db, db), "Chick") # fails: two lookup candidates
# two lookups without references is fine
rels <- subrelations(db)
add_lookup(c(rels, rels), "Chick")
Run the code above in your browser using DataLab