Learn R Programming

doofa (version 1.0)

revbin: reverse of bin function i.e., returns which elements of a binary vector is 1

Description

reverse of bin function i.e., returns which elements of a binary vector is 1

Usage

revbin(x)

Value

a postive integer m

Arguments

x

a vector with 0 and 1s such that there is only 1

Examples

Run this code
revbin(c(0,1,0,0));

Run the code above in your browser using DataLab