as.audited: Create Audited Objects

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/audited.R

Description

These methods coerce their arguments to class audited. An audited object keeps track of changes in row count caused by supported methods. The record of a change is called a transaction, and is stored in an audit table. The table is retrievable using audit and can be plotted as a directed graph using plot.igraph.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'data.frame'
as.audited(x, key = character(0), id, ...)
## S3 method for class 'keyed'
as.audited(x, key = match.fun('key')(x), id, ...)
## S3 method for class 'audited'
as.audited(x, key = match.fun('key')(x), id, ...)
## S3 method for class 'nm'
as.audited(x, key = match.fun('key')(x), id, ...)
## S3 method for class 'audited'
alias(object, id, ...)

Arguments

x

object to be coerced

key

character; see as.keyed

id

optional name for this object for use in the audit table

...

ignored or passed

object

object to be aliased

Details

The argument id will be guessed from context if missing.

as.audited.audited provides a chance to change the key or id of the object. An additional record will be added if counts differ from most recent, even if no other changes are made.

alias.audited updates the id not just on the object, but also in last result identifier in the audit table. It supports the notion that the last transaction resulted in a new entity rather than merely a modification to an existing entity.

as.audited.nm promotes ('nm','keyed','data.frame') to ('nm','audited','keyed','data.frame'). There is no going back: used on ('nm','audited','keyed','data.frame') it gives simply ('audited','keyed','data.frame'). A passed key is respected. id is respected if passed; otherwise id is same as existing or is inferred from the argument.

Value

audited

Author(s)

Tim Bergsma

References

http://metrumrg.googlecode.com

See Also

Examples

1

audited documentation built on May 2, 2019, 4:45 p.m.