shuffle: shuffle

Description Usage Arguments Details Value Author(s) Examples

View source: R/shuffle.R

Description

shuffle a dataset

Usage

1
shuffle(data, seed = NA)

Arguments

data

a data frame

seed

a random seed to fix the shuffling - optional

Details

Takes a dataset and randomly orders the rows. Good to make sure there's no row-dependence before partitioning.

Value

Returns the dataframe, shuffled.

Author(s)

Matt Simmons mattsimmons@email.com

Examples

1
2
df <- data.frame(x = 1:100, y = 101:200)
shuffled_df <- shuffle(df)

mattsq/examplePackage documentation built on May 23, 2020, 12:23 p.m.