Skip to content

Commit 42d63ad

Browse files
typo and unsortable in place of unsupported
1 parent 0a583fa commit 42d63ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/setkey.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ setkeyv = function(x, cols, verbose=getOption("datatable.verbose"), physical=TRU
4343
if (!all(nzchar(cols))) stopf("cols contains some blanks.")
4444
cols = gsub("`", "", cols, fixed = TRUE)
4545
miss = !(cols %chin% colnames(x))
46-
if (any(miss)) stopf("some columns are not in the data.table: %s", brackify(cols[miss]), class = "dt_missing_colulmn_error")
46+
if (any(miss)) stopf("some columns are not in the data.table: %s", brackify(cols[miss]), class = "dt_missing_column_error")
4747

4848
if (physical && identical(head(key(x), length(cols)), cols)){ ## for !physical we need to compute groups as well #4387
4949
## key is present but x has a longer key. No sorting needed, only attribute is changed to shorter key.
@@ -54,7 +54,7 @@ setkeyv = function(x, cols, verbose=getOption("datatable.verbose"), physical=TRU
5454
if (".xi" %chin% names(x)) stopf("x contains a column called '.xi'. Conflicts with internal use by data.table.")
5555
for (i in cols) {
5656
.xi = x[[i]] # [[ is copy on write, otherwise checking type would be copying each column
57-
if (!typeof(.xi) %chin% ORDERING_TYPES) stopf("Column '%s' is type '%s' which is not supported as a key column type, currently.", i, typeof(.xi), class="dt_unsupported_type_error")
57+
if (!typeof(.xi) %chin% ORDERING_TYPES) stopf("Column '%s' is type '%s' which is not supported as a key column type, currently.", i, typeof(.xi), class="dt_unsortable_type_error")
5858
}
5959
if (!is.character(cols) || length(cols)<1L) internal_error("'cols' should be character at this point") # nocov
6060

@@ -266,11 +266,11 @@ setorderv = function(x, cols = colnames(x), order=1L, na.last=FALSE)
266266
# remove backticks from cols
267267
cols = gsub("`", "", cols, fixed = TRUE)
268268
miss = !(cols %chin% colnames(x))
269-
if (any(miss)) stopf("some columns are not in the data.table: %s", brackify(cols[miss]), class = "dt_missing_colulmn_error")
269+
if (any(miss)) stopf("some columns are not in the data.table: %s", brackify(cols[miss]), class = "dt_missing_column_error")
270270
if (".xi" %chin% colnames(x)) stopf("x contains a column called '.xi'. Conflicts with internal use by data.table.")
271271
for (i in cols) {
272272
.xi = x[[i]] # [[ is copy on write, otherwise checking type would be copying each column
273-
if (!typeof(.xi) %chin% ORDERING_TYPES) stopf("Column '%s' is type '%s' which is not supported for ordering currently.", i, typeof(.xi), class="dt_unsupported_type_error")
273+
if (!typeof(.xi) %chin% ORDERING_TYPES) stopf("Column '%s' is type '%s' which is not supported for ordering currently.", i, typeof(.xi), class="dt_unsortable_type_error")
274274
}
275275
if (!is.character(cols) || length(cols)<1L) internal_error("'cols' should be character at this point") # nocov
276276

0 commit comments

Comments
 (0)