# NOT RUN {
data(efc)
std(efc$c160age) %>% head()
std(efc, e17age, c160age) %>% head()
center(efc$c160age) %>% head()
center(efc, e17age, c160age) %>% head()
# NOTE!
std(efc$e17age) # returns a vector
std(efc, e17age) # returns a tibble
# works with mutate()
library(dplyr)
efc %>%
select(e17age, neg_c_7) %>%
mutate(age_std = std(e17age), burden = center(neg_c_7)) %>%
head()
# }
Run the code above in your browser using DataLab