Skip to content

Commit 1e3ebd6

Browse files
authored
Merge pull request #1411 from cmu-delphi/fix-smoothed-recent-raw
[CTIS] Fix `latest_weight_date` regex input so date isn't missing
2 parents a2004f3 + 6259d74 commit 1e3ebd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

facebook/delphiFacebook/R/weights.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ join_weights <- function(data, params, weights = c("step1", "full"))
6565

6666
latest_weight <- tail(weights_files, n = 1)
6767
latest_weight_date <- as.Date(
68-
stri_extract_first(latest_weight, regex = "^[0-9]{4}-[0-9]{2}-[0-9]{2}")
68+
stri_extract_first(basename(latest_weight), regex = "^[0-9]{4}-[0-9]{2}-[0-9]{2}")
6969
)
7070

7171
col_types <- c("character", "double")

0 commit comments

Comments
 (0)