get_body_attr: Get Event Body Attribute

Description Usage Arguments Value Examples

View source: R/get_body_attr.R

Description

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

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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)

eventr documentation built on July 8, 2020, 7:32 p.m.