-
-
Save Ironholds/5064758 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
entropy.df <- subset( | |
tickets.df[ | |
1:nrow( | |
tickets.df | |
) | |
%in% which( | |
outer( | |
subset( | |
tickets.df, | |
period == "hadean" | |
)$user, | |
subset( | |
tickets.df, | |
period == "prehadean" | |
)$user, | |
"==" | |
), | |
arr.ind=TRUE | |
), | |
], period == "hadean" | |
) | |
#Ookay, this isn't working. It should be pulling out all tickets with period "hadean" with a userID matching a userID from the tickets with period "prehadean". It returns a null. I can /see/ userIDs present in both. The fuck? |
That appears to pull out all matching userIDs rather than all rows with matching userIDs.
That's just because the second line has a column selected.
entropy.df <- tickets.df[tickets.df[, "user"] %in% hadean.ids & tickets.df[, "period"] == "prehadean", ]
Will subset the df.
Clever. Is 'I have a moral aversion to creating objectnames' a useful explanation to the implicit 'why is the gist written like lisp, you jerkhole' question?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why doesn't
Work?