bigGER: Will expand or shirnk (2 dim) matrices or data frames for...

Description Usage Arguments Details Value Note

View source: R/bigGER.R


This function works in two steps. Firstly, it will either expand or shrink the colums randomly. If it expands the orinial columns will be untouched and left in the orginial order. If you are shrinking then the columns will disappear in a roandom order.





A matrix or data.frame like object with two dimensions


The number of columns of x you would like, or the "width" if you will


The number of rows of x you would like, or the "length" if you would


The second step is with the rows. These do not get copied identically lik eth ecolumns do becauase of the issues with singularities. Instead, inside of each column, we will randomly sample the lements with replacement and then use these randomly sampled elements as the new rows for the colun. The practical upshot being the new rows we create will be unique and have been generated with the data we have seen before but without have to worry about columns being perfect linear combinations of each other. Again as with the columns, if you exapnd the number of rows the the original rows will remain unchanged. If you shrink the rows we will randomly sample from the whole matrix/data.frame to get a smaller subsetted matrix.


A matrix with the same data as x of dimension "length" x "width"


Width and length will be rounded if they do not come in as natural numbers

vinny-paris/the_knockoff_of_a_knockoff documentation built on May 26, 2019, 12:32 p.m.