mutate_eav: Mutate an EAV table (e.g., add/modify rows)

Description Usage Arguments Examples

View source: R/mutate.R

Description

Mutate an EAV table (e.g., add/modify rows)

Usage

1
mutate_eav(.data, ...)

Arguments

...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
tinyeav %>%
  mutate_eav(middle = "Ramsey")

tinyeav %>%
  group_by(empid) %>%
  summarize(var = "middle",
            value = "Ramsey") %>% {
    bind_rows(tinyeav, .)}

tinyeav %>%
  mutate_eav(middle = if_else(first == "John", "Ramsey", middle))

tinyeav %>%
  group_by(empid) %>%
  summarize(middle = if_else(any(var == "first" & value == "John"), "Ramsey", lookup(value, var == "middle") ))

jameelalsalam/eavtools documentation built on Oct. 17, 2019, 1:45 a.m.