Skip to content

Commit 72897ca

Browse files
Fix key comparison for column selection matching non-syntactical names (#306)
Resolves #305
1 parent 9e0057e commit 72897ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/subset.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
}
5252

5353
new_key <- cn[cn %in% key_vars(x)]
54-
maybe_tsibble <- n_keys(x) > 1 && !all(is.element(key(x), new_key))
54+
maybe_tsibble <- n_keys(x) > 1 && !all(is.element(key_vars(x), new_key))
5555

5656
# Column subsetting only
5757
if (is_null(i) && !is_null(j) && maybe_tsibble) return(as_tibble(res))

0 commit comments

Comments
 (0)