@@ -37,11 +37,11 @@ merge.data.table = function(x, y, by = NULL, by.x = NULL, by.y = NULL, all = FAL
3737 stopf(" A non-empty vector of column names is required for `by.x` and `by.y`." )
3838 if (! all(by.x %chin % nm_x )) {
3939 missing_by_x = setdiff(by.x , nm_x )
40- stopf(" Elements listed in `by.x` must be valid column names in x. Missing: %s" , paste (missing_by_x , collapse = " , " ))
40+ stopf(" Elements listed in `by.x` must be valid column names in x. Missing: %s" , toString (missing_by_x )) # changed here
4141 }
4242 if (! all(by.y %chin % nm_y )) {
4343 missing_by_y = setdiff(by.y , nm_y )
44- stopf(" Elements listed in `by.y` must be valid column names in y. Missing: %s" , paste (missing_by_y , collapse = " , " ))
44+ stopf(" Elements listed in `by.y` must be valid column names in y. Missing: %s" , toString (missing_by_y )) # changed here
4545 }
4646 by = by.x
4747 names(by ) = by.y
@@ -58,7 +58,7 @@ merge.data.table = function(x, y, by = NULL, by.x = NULL, by.y = NULL, all = FAL
5858 missing_in_x = setdiff(by , nm_x )
5959 missing_in_y = setdiff(by , nm_y )
6060 stopf(" Elements listed in `by` must be valid column names in x and y. Missing in x: %s. Missing in y: %s" ,
61- paste (missing_in_x , collapse = " , " ), paste (missing_in_y , collapse = " , " ))
61+ toString (missing_in_x ), toString (missing_in_y )) # changed here
6262 }
6363 by = unname(by )
6464 by.x = by.y = by
0 commit comments