Skip to content

Instantly share code, notes, and snippets.

@Ironholds
Last active December 14, 2015 12:08
Show Gist options
  • Save Ironholds/5083690 to your computer and use it in GitHub Desktop.
Save Ironholds/5083690 to your computer and use it in GitHub Desktop.
Loose metric. Running against the comments field from recentchanges, and it really /should/ be picking things up.
rc.df <- read.delim (file.path(getwd(), "Vpocalypse", "RecentChanges", "recentchanges.tsv"), header = TRUE, na.strings='NULL', as.is = TRUE, colClasses=c("user_editcount"="numeric"))
test <- grep(
pattern = "
(^revert\ to.+using)
| (^reverted\ edits\ by.+using)
| (^reverted\ edits\ by.+to\ last\ version\ by)
| (^bot\ -\ rv.+to\ last\ version\ by)
| (-assisted\ reversion)
| (^(revert(ed)?|rv).+to\ last)
| (^undo\ revision.+by)",
rc.df$rc_comment,
value = FALSE,
ignore.case = TRUE,
perl = TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment