tribe (version 0.1.6)

tribe: Object attribute list

Description

The function tribe is identical to attributes, expect that it always returns a named list (thus, when attributes will return NULL, tribe will return an empty named list).

Usage

tribe(obj, keep_obj = FALSE)

tribe(obj) <- value

untribe(x)

Arguments

obj

An object.

keep_obj

logical. If TRUE, obj is passed as an attribute to the result (useful in combination of untribe).

value

An appropriate named list of attributes, or NULL.

x

A list (of attributes) to be untribed.

Value

A named list, the attributes of obj.

See Also

attributes, attributes<-, mostattributes<-.

Examples

Run this code
# NOT RUN {
library(lplyr)
A <- c(x = 1, y = 2, z = 3) %>% 
  define(package = "trib?")
A %>% 
  tribe(keep_obj = TRUE) %@>% 
  mutate(package = "tribe") %>% 
  untribe()

# }

Run the code above in your browser using DataLab