Skip to content

Commit

Permalink
Fix key comparison for column selection matching non-syntactical names (
Browse files Browse the repository at this point in the history
#306)

Resolves #305
  • Loading branch information
mitchelloharawild authored Jun 26, 2024
1 parent 9e0057e commit 72897ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/subset.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}

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

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

0 comments on commit 72897ca

Please sign in to comment.