Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in specific_intersections when keep == sets #36

Closed
leipzig opened this issue Feb 19, 2016 · 1 comment
Closed

bug in specific_intersections when keep == sets #36

leipzig opened this issue Feb 19, 2016 · 1 comment

Comments

@leipzig
Copy link

leipzig commented Feb 19, 2016

specific_intersections <- function(data, first.col, last.col, intersections, order_mat,
                                   aggregate, decrease, cut, mbar_color){
  sets <- names(data[c(first.col:last.col)])
  keep <- unique(unlist(intersections))
  remove <- sets[which(!sets %in% keep)]
  remove <- which(names(data) %in% remove)
  data <- data[-remove]

when keep is equivalent to sets remove is set to integer(0) and data gets wiped out

Browse[2]> remove
integer(0)
Browse[2]> data[-remove]
data frame with 0 columns and 14632 rows
@JakeConway
Copy link
Member

Thanks for the find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants