shuffle_data: Shuffle a dataframe, repeating columns.

View source: R/shuffle.R

shuffle_dataR Documentation

Shuffle a dataframe, repeating columns.

Description

Given a dataframe with columns ABCD and an even number of rows, shuffle and duplicate the columns to produce (e.g.) AAACCCBBBDDD and shuffle the rows from 1234 to 1324.

Usage

shuffle_data(df, each = 3)

Arguments

df

(dataframe) The dataframe to shuffle.

each

(integer) How many times to repeat each column.

Value

The shuffled/duplicated dataframe.


deepgenomics/dgshuffle documentation built on June 1, 2022, 8:18 a.m.