Skip to contents

Shuffle order of elements in object

Usage

shuffle(object, ...)

# S3 method for tbl_df
shuffle(object, ...)

Arguments

object

object to shuffle

...

other arguments

Methods (by class)

  • shuffle(tbl_df): Shuffle order of rows in tibble

Examples

tibble::tibble(i = 1:10) |>
  shuffle()
#> # A tibble: 10 × 1
#>        i
#>    <int>
#>  1     3
#>  2     5
#>  3     7
#>  4     6
#>  5     9
#>  6     8
#>  7     1
#>  8    10
#>  9     4
#> 10     2