@@ -38,12 +38,12 @@ merge.data.table = function(x, y, by = NULL, by.x = NULL, by.y = NULL, all = FAL
3838 if (! all(by.x %chin % nm_x )) {
3939 missing_in_x <- setdiff(by.x , nm_x )
4040 stopf(" The following columns listed in `by.x` are missing from `x`: %s" ,
41- paste (missing_in_x , collapse = " , " ))
41+ toString (missing_in_x ))
4242 }
4343 if (! all(by.y %chin % nm_y )) {
4444 missing_in_y <- setdiff(by.y , nm_y )
4545 stopf(" The following columns listed in `by.y` are missing from `y`: %s" ,
46- paste (missing_in_y , collapse = " , " ))
46+ toString (missing_in_y ))
4747 }
4848 by = by.x
4949 names(by ) = by.y
@@ -60,8 +60,8 @@ merge.data.table = function(x, y, by = NULL, by.x = NULL, by.y = NULL, all = FAL
6060 missing_in_y <- setdiff(by , nm_y )
6161 if (length(missing_in_x ) > 0 || length(missing_in_y ) > 0 ) {
6262 stopf(" The following columns are missing:\n %s%s" ,
63- if (length(missing_in_x ) > 0 ) sprintf(" - From `x`: %s\n " , paste (missing_in_x , collapse = " , " )) else " " ,
64- if (length(missing_in_y ) > 0 ) sprintf(" - From `y`: %s\n " , paste (missing_in_y , collapse = " , " )) else " " )
63+ if (length(missing_in_x ) > 0 ) sprintf(" - From `x`: %s\n " , toString (missing_in_x )) else " " ,
64+ if (length(missing_in_y ) > 0 ) sprintf(" - From `y`: %s\n " , toString (missing_in_y )) else " " )
6565 }
6666 by = unname(by )
6767 by.x = by.y = by
0 commit comments