Description Usage Arguments Value Author(s) Examples
swap the 1's and 0's around
1 | binary.swap(x)
|
x |
a numeric vector of 0/1 |
a numeric vector like the input, but with 1's and 0's swapped.
Mark Cowley, 2011-09-02
1 2 3 4 5 6 7 | input <- c(0,1,0,1)
binary.swap(input)
## Not run:
binary.swap(c(input, NA))
# Error in binary.swap(c(input, NA)) : x must be 0's and 1's
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.