Learn R Programming

useful (version 1.2.6)

binary.flip: binary.flip

Description

Flip binary numbers

Usage

binary.flip(x)

Value

X with 0's flipped to 1's and 1's flipped to 0's

Arguments

x

A vector of 0/1 numbers.

Author

Jared P. Lander

Examples

Run this code

binary.flip(c(1,1,0,1,0,0,1))

Run the code above in your browser using DataLab