Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(tidyverse)
- library(sjmisc)
- df <- tibble(v1 = rbinom(10, 1, .5),
- v2 = rbinom(10, 1, .5),
- wt_1 = runif(10, 0, 2),
- wt_2 = runif(10, 0, 2),
- wt_3 = runif(10, 0, 2)
- )
- df %>%
- select(starts_with("wt_")) %>%
- map(~frq(select(df, v1, v2), weights = .x))
- Weights `.x` not found in data.
- Weights `.x` not found in data.
- Weights `.x` not found in data.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement