Skip to content

Commit 62b7c8a

Browse files
avoid structure()
1 parent 495a06d commit 62b7c8a

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

R/bmerge.R

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,15 @@ bmerge = function(i, x, icols, xcols, roll, rollends, nomatch, mult, ops, verbos
8585
}
8686
}
8787
condition_message = gettextf("Incompatible join types: %s (%s) and %s (%s). Factor columns must join to factor or character columns.", xname, x_merge_type, iname, i_merge_type)
88-
condition = structure(
89-
list(
90-
message = condition_message,
91-
call = sys.call(sys.nframe()-1L),
92-
bmerge_x_arg_col_name = names(x)[xcol],
93-
bmerge_x_arg_type = x_merge_type,
94-
bmerge_i_arg_col_name = names(i)[icol],
95-
bmerge_i_arg_type = i_merge_type
96-
),
97-
class = c("dt_bmerge_incompatible_type_error", "error", "condition")
88+
condition = list(
89+
message = condition_message,
90+
call = sys.call(sys.nframe() - 1L),
91+
bmerge_x_arg_col_name = names(x)[xcol],
92+
bmerge_x_arg_type = x_merge_type,
93+
bmerge_i_arg_col_name = names(i)[icol],
94+
bmerge_i_arg_type = i_merge_type
9895
)
96+
class(condition) = c("dt_bmerge_incompatible_type_error", "error", "condition")
9997
stop(condition)
10098
}
10199
# we check factors first to cater for the case when trying to do rolling joins on factors

0 commit comments

Comments
 (0)