Skip to content

Commit 42eb793

Browse files
committed
Clean up some commented-out code
1 parent b9bac78 commit 42eb793

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

R/methods-epi_df.R

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,8 @@ dplyr_row_slice.epi_df = function(data, i, ...) {
182182
old_names = names(x)
183183
old_other_keys = attr(x, "metadata")[["other_keys"]]
184184
result = NextMethod()
185-
new_other_keys_almost <- value[match(old_other_keys, old_names)]
186-
attr(result, "metadata")[["other_keys"]] <-
187-
# patch until we require `other_keys` to be `chr`; match NULL-ness of input `other_keys`:
188-
# if (length(new_other_keys_almost) == 0L) NULL
189-
# if (is.null(old_other_keys)) NULL
190-
# else new_other_keys_almost
191-
new_other_keys_almost
185+
new_other_keys <- value[match(old_other_keys, old_names)]
186+
attr(result, "metadata")[["other_keys"]] <- new_other_keys
192187
# decay to non-`epi_df` if needed:
193188
dplyr::dplyr_reconstruct(result, result)
194189
}

0 commit comments

Comments
 (0)