X-Git-Url: https://projects.mako.cc/source/redirect-tools/blobdiff_plain/94bd17bbb5059ab82da990a6488cbe6eb3d5c42d..3b4abffad512c276d539045922133cc4dec77673:/02-generate_spells.R diff --git a/02-generate_spells.R b/02-generate_spells.R index dc5850b..528091d 100644 --- a/02-generate_spells.R +++ b/02-generate_spells.R @@ -1,16 +1,17 @@ source("redirect_tools.R") +cur.dir <- getwd() + # save the run number setwd(redirect.data.dir) redirect.spells <- filename.to.spells(list.files()) +setwd(cur.dir) setwd(spells.data.dir) save(redirect.spells, file="redirect_spells.RData") -write.csv(redirect.spells, file="redirect_spells.tsv", sep="\t" +write.table(redirect.spells, file="redirect_spells.tsv", sep="\t", fileEncoding="UTF-8", row.names=FALSE) library(foreign) write.dta(redirect.spells, file="redirect_spells.dta") - -