flipn | R Documentation |
Generates all 2^n
vectors of length n
consisting of the elements -1 and 1.
flipn(n)
n |
Number of elements. |
Adapted from the "bincombinations" function in the e1071 R package.
Matrix of dimension n
by 2^n
where each column contains a unique sign-flip vector.
For large n
this function will consume a lot of memory and may even crash R.
Used for exact tests in np.loc.test
and np.reg.test
.
Nathaniel E. Helwig <helwig@umn.edu>
Meyer, D., Dimitriadou, E., Hornik, K., Weingessel, A., & Leisch, F. (2018). e1071: Misc Functions of the Department of Statistics, Probability Theory Group (Formerly: E1071), TU Wien. R package version 1.7-0. https://CRAN.R-project.org/package=e1071
flipn(2)
flipn(3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.