Description Usage Arguments Details Value Note
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.
1 |
x |
A matrix or data.frame like object with two dimensions |
width |
The number of columns of x you would like, or the "width" if you will |
length |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.