Learn R Programming

eventr (version 1.0.0)

get_body_attr: Get Event Body Attribute

Description

This function returns an attribute or list of attributes from the body of an event or list of events.

Usage

get_body_attr(obj, attr)

Arguments

obj

An event or a list of events.

attr

A character string indicating the attribute to return.

Value

get_body_attr() returns a single attribute from an event or an event_list object.

Examples

Run this code
# NOT RUN {
first_event <- event(
  id = 'first-event',
  type = 'FIRST_EVENT',
  time = Sys.time(),
  attr_01 = 'first-attribute-01'
)

second_event <- event(
  id = 'second-event',
  type = 'SECOND_EVENT',
  time = Sys.time(),
  attr_01 = 'first-attribute-02'
)

the_event_list <- event_list(first_event, second_event)

get_type(the_event_list)

# }

Run the code above in your browser using DataLab