Reloading an S4 object that has a slot with a data.table may result in buggy behavior. this auxiliary function will copy the data.table once to have a restored object that works.

restore(filename)

Arguments

filename

A *.rds file to restore.

Examples

k <- kwic("REUTERS", query = "oil") kwicfile <- tempfile() saveRDS(k, file = kwicfile) k <- restore(filename = kwicfile) k2 <- enrich(k, s_attribute = "id")