From: Benjamin Mako Hill Date: Fri, 29 May 2015 06:25:05 +0000 (-0700) Subject: removed code that is only useful for producing the sweave file for the paper X-Git-Url: https://projects.mako.cc/source/protection-tools/commitdiff_plain/a0943915c43a2ce4d776a40b77be197cb73c930a removed code that is only useful for producing the sweave file for the paper --- diff --git a/05-generate_spells.R b/05-generate_spells.R index 8356273..cfbbd79 100644 --- a/05-generate_spells.R +++ b/05-generate_spells.R @@ -319,6 +319,8 @@ r[["num.dropped.level.nomatch"]] <- nrow(tmp) # as a result, we can simply drop these form the final state # an alternate approach would be to set these to NA as in: # spells[tmp, level := as.character(NA), mult="last"] + + final.state <- final.state[!tmp,] # now, we have to take the list of open spells and find the subset of the final @@ -341,20 +343,3 @@ setkey(spells, title) save(spells, file="spells.RData") -# save several other computationally intensive datasets - -# load page info data -page.metadata.filename <- "enwiki-20150112-page.csv" -page.info <- fread(page.metadata.filename, - header=FALSE, stringsAsFactors=FALSE, na.strings=NULL, - select=1:3, showProgress=TRUE) - -setnames(page.info, c("page.id", "ns.num", "title")) - -r[["num.pages"]] <- nrow(page.info) -r[["num.pages.main"]] <- table(page.info$ns.num)[["0"]] - -## save and go home -########################################################## -save(r, file="sweave_data_spellgen.RData") -