Skip to content

Commit

Permalink
🐛 date_match repeat error bad sprintf format
Browse files Browse the repository at this point in the history
  • Loading branch information
WillForan committed Nov 19, 2021
1 parent aef8d9f commit deadaa3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/date_match.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ date_match <-function(d1, d2, idcol, datecol1, datecol2=datecol1, all.x=F,
n_uniq_iddate <- length(unique(paste(d1[[idcol]], d1[[datecol1]])))
n_d1 <- nrow(d1)
if (n_uniq_iddate < n_d1)
stop(sprintf("datecol1 '%s' repeats within id(%d uniue of %d total rows)
stop(sprintf("datecol1 '%s' repeats within id (%d unique id+date pairs in %d total rows)
conider double merge:\n",
n_uniq_iddate, n_d1, datecol1),
datecol1, n_uniq_iddate, n_d1),
" d1 %>% select(idcol, datecol1) %>%\n",
" unique %>% date_merge(d2, 'idcol', 'datecol1') %>% inner_join(d1)")

Expand Down
2 changes: 0 additions & 2 deletions man/date_match.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit deadaa3

Please sign in to comment.