getUUID: get a UUID to attach to an object

Description Usage Arguments Details Value Examples

View source: R/logTools.R

Description

getUUID uses the uuid package to prepare a UUID suitable to be attached to an object identified by objectName.

Usage

1
getUUID(objectName, overwrite = FALSE)

Arguments

objectName

char. Name of an R object

overwrite

logical. Flag to control whether an existing UUID should be overwritten. Default FALSE.

Details

The overwrite flag can be understood as follows: - if the object does not have a $UUID attribute, a UUID is returned - if the object has a $UUID attribute and "overwrite" is TRUE a new UUID is returned. - if the object has a $UUID attribute and "overwrite" is FALSE, the old UUID is returned.

Note: no check is done whether the original $UUID attribute is a valid UUID.

Value

the value of the original UUID attribute, or a new UUID

Examples

1
2
3
4
5
## Not run: 
  tmp <- "c"
  getUUID("tmp")

## End(Not run)

hyginn/ekplektoR documentation built on May 17, 2017, 12:08 a.m.