Learn R Programming

messy (version 0.1.0)

duplicate_rows: Duplicate rows and insert them into the dataframe in order or at random

Description

Duplicate rows and insert them into the dataframe in order or at random

Usage

duplicate_rows(data, messiness = 0.1, shuffle = FALSE)

Value

A dataframe with duplicated rows inserted

Arguments

data

input dataframe

messiness

Percentage of rows to duplicate. Must be between 0 and 1. Default 0.1.

shuffle

Insert duplicated data underneath original data or insert randomly

Author

Philip Leftwich

Examples

Run this code
duplicate_rows(mtcars, messiness = 0.1)

Run the code above in your browser using DataLab