Skip to content

Instantly share code, notes, and snippets.

@monogenea
Created October 7, 2019 18:12
Show Gist options
  • Save monogenea/4d80c7f135425f06deaa8ac4b0dbec55 to your computer and use it in GitHub Desktop.
Save monogenea/4d80c7f135425f06deaa8ac4b0dbec55 to your computer and use it in GitHub Desktop.
# binary vars
binVars <- which(sapply(X, function(x){all(x %in% 0:1)}))
missingVars <- which(apply(X, 2, function(k){any(is.na(k))}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment