Created
December 20, 2020 18:38
-
-
Save alexpghayes/d3b4c0f53f34e135f277ada2477325dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d_trial_only <- discrim %>% | |
select(contains("d_trial")) %>% | |
as.matrix() | |
pos <- max(d_trial_only, 0) # might need to use pmax instead of max | |
discrim$score <- colSums(pos) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment