@@ -17,7 +17,7 @@ as_tibble.epi_df <- function(x, ...) {
1717 # first instead.
1818 destructured <- tibble :: as_tibble(vctrs :: vec_data(x ), ... )
1919 if (attr(x , " decay_to_tibble" ) %|| % TRUE ) {
20- return ( destructured )
20+ destructured
2121 } else {
2222 # We specially requested via attr not to decay epi_df-ness but to drop any
2323 # grouping.
@@ -39,12 +39,10 @@ as_tibble.epi_df <- function(x, ...) {
3939# ' @export
4040as_tsibble.epi_df <- function (x , key , ... ) {
4141 if (missing(key )) key <- c(" geo_value" , attributes(x )$ metadata $ other_keys )
42- return (
43- as_tsibble(
44- tibble :: as_tibble(x ),
45- key = tidyselect :: all_of(key ), index = " time_value" ,
46- ...
47- )
42+ as_tsibble(
43+ tibble :: as_tibble(x ),
44+ key = tidyselect :: all_of(key ), index = " time_value" ,
45+ ...
4846 )
4947}
5048
@@ -351,8 +349,8 @@ unnest.epi_df <- function(data, ...) {
351349# Simple reclass function
352350reclass <- function (x , metadata ) {
353351 class(x ) <- unique(c(" epi_df" , class(x )))
354- attributes( x ) $ metadata <- metadata
355- return ( x )
352+ attr( x , " metadata" ) <- metadata
353+ x
356354}
357355
358356# ' Arrange an epi_df into a standard order
@@ -376,7 +374,7 @@ arrange_canonical.default <- function(x, ...) {
376374 cli :: cli_abort(c(
377375 " `arrange_canonical()` is only meaningful for an {.cls epi_df}."
378376 ))
379- return ( x )
377+ x
380378}
381379
382380# ' @export
@@ -397,7 +395,7 @@ arrange_row_canonical.default <- function(x, ...) {
397395 cli :: cli_abort(c(
398396 " `arrange_row_canonical()` is only meaningful for an {.cls epi_df}."
399397 ))
400- return ( x )
398+ x
401399}
402400
403401# ' @export
@@ -417,7 +415,7 @@ arrange_col_canonical.default <- function(x, ...) {
417415 cli :: cli_abort(c(
418416 " `arrange_col_canonical()` is only meaningful for an {.cls epi_df}."
419417 ))
420- return ( x )
418+ x
421419}
422420
423421# ' @export
0 commit comments