Learn R Programming

doofa (version 1.0)

vrevbin: vectorized revbin function

Description

vectorized revbin function

Usage

vrevbin(x, m)

Value

a vector of n positive integers

Arguments

x

a binary vector of length nm, such that each length of m has only one 1 and rest as 0

m

a positive integer

Examples

Run this code
vrevbin(x=c(0,0,1,0,1,0), m = 3);

Run the code above in your browser using DataLab