Skip to content

Commit

Permalink
Updated step5 to work with updated outputs of steps upstream (test st…
Browse files Browse the repository at this point in the history
…ill to be fixed); #4
  • Loading branch information
dhixsingh committed Mar 16, 2021
1 parent 045cc8a commit f0a2ba8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions R/locateParallel.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
locatePlans <- function(censuscsv, vistacsv, matchcsv, outdir, outcsv, rseed = NULL) {
# example inputs
# censuscsv<-'../output/2.sample/sample.csv.gz'
# vistacsv<-'../output/3.plan/plan.csv'
# matchcsv<-'../output/4.match/match.csv.gz'
# vistacsv<-'../output/4.plan/plan.csv'
# matchcsv<-'../output/4.plan/plan2agent2group.csv'
# outdir<-'../output/5.locate'
# outcsv<-'../output/5.locate/plan.csv'
# planGroup=1
Expand Down Expand Up @@ -206,7 +206,7 @@ matches<-read.csv(gz1, header=T, stringsAsFactors=F, strip.white=T)
close(gz1)

# set.seed(20200406) # for when we want to have the same LocationType each time
plans<-origplans %>%
plans<-origplans[,c("PlanId","Activity","StartBin","EndBin")] %>%
# Remove all plans that are not matched
filter(PlanId %in% matches$PlanId) %>%
# Assign matched PersonId (very fast since we assume row number equals Id number)
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/testLocateParallel.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ source("../../R/locateParallel.R")

test_that("Assigning SA1s to activities works", {

skip('TODO: This test is to be updated to use matched groups')
skip("FIXME: skipping because the test run produces errors")
rseed<-12345
set.seed(rseed)
censuscsv<-'./tests/expected/2.sample/sample.csv.gz'
vistacsv<-'./tests/expected/3.plan/plan.csv'
matchcsv<-'./tests/expected/4.match/match.csv.gz'
vistacsv<-'./tests/expected/4.plan/plan.csv'
matchcsv<-'./tests/expected/4.plan/plan2agent2group.csv'
outdir<-'./tests/actual/5.locate'
outcsv<-'./tests/actual/5.locate/plan.csv'
dir.create(outdir, showWarnings = FALSE, recursive=TRUE)
Expand Down

0 comments on commit f0a2ba8

Please sign in to comment.