Skip to content

Instantly share code, notes, and snippets.

@alexpghayes
Created December 20, 2020 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexpghayes/d3b4c0f53f34e135f277ada2477325dd to your computer and use it in GitHub Desktop.
Save alexpghayes/d3b4c0f53f34e135f277ada2477325dd to your computer and use it in GitHub Desktop.
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