Learn R Programming

doofa (version 1.0)

bin: binary representation of x (an element from 1 to m) with m components

Description

binary representation of x (an element from 1 to m) with m components

Usage

bin(x, m)

Value

a vector with elements 1 and 0

Arguments

x

a positive integer less than or equal to m

m

number of components, a positive integer

Examples

Run this code
bin(x = 2, m = 4);

Run the code above in your browser using DataLab