Learn R Programming

egor (version 1.24.2)

activate.egor: Activate ego, alter or alter-alter tie data level of an egor dataset

Description

This function activates one of the data levels of an egor dataset, so that the dplyr verbs know which level to execute on.

Usage

# S3 method for egor
activate(.data, what)

Arguments

.data

The egor dataset.

what

Character naming the level to activate, this can be "ego", "alter" or "aatie".

Examples

Run this code
e <- make_egor(5,50)
e %>% 
   activate("aatie") %>% 
   mutate(weight2 = 2 + weight) %>% 
   activate("alter") %>% 
   mutate(age.years = age.years^3)

Run the code above in your browser using DataLab