Description Usage Arguments Details Value Author(s) Examples
expand2
generates duplicated observations within a dataframe.
1 |
data |
a data frame object |
n_n |
index or indexes specifying row numbers |
copies |
desired number of copies |
original |
a logical indicating whether to keep the original dataframe |
expand2
appends observations from the dataframe
with n copies of the observations with
specified indexes of observations or all data.
data.frame
Email: dr.myominnoo@gmail.com
Website: https://myominnoo.github.io/
1 2 3 4 5 | ## create duplicates
x <- expand2(infert, 1:5, copies = 2)
## check duplicates report and rmeove dup
duplicates(x, drop = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.