Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.binary

Binary Vectors


Description

is.binary is used to test if a vector is of binary type, i.e. if a vector contains only 0 and/or 1 values.

Usage

is.binary(x)

Arguments

x

a vector to be tested.

Value

is.binary returns TRUE or FALSE depending on whether a vector is of binary type or not.

Examples

x1 <- runif(100, 0, 1)
x2 <- ifelse(x1 < 0.5, 1, 0)
is.binary(x1)
is.binary(x2)

WinRatio

Win Ratio for Prioritized Outcomes and 95% Confidence Interval

v1.0
GPL (>= 2)
Authors
Kevin Duarte, Joao Pedro Ferreira
Initial release
2020-11-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.