]> projects.mako.cc - protection-tools/commitdiff
removed code that is only useful for producing the sweave file for the paper
authorBenjamin Mako Hill <mako@atdot.cc>
Fri, 29 May 2015 06:25:05 +0000 (23:25 -0700)
committerBenjamin Mako Hill <mako@atdot.cc>
Fri, 29 May 2015 06:27:21 +0000 (23:27 -0700)
05-generate_spells.R

index 8356273fc7229cad7d0f1df975247f8030ec19ef..cfbbd798af69ced67a13c8ed9a02a87bf62863e4 100644 (file)
@@ -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")
-

Benjamin Mako Hill || Want to submit a patch?