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

Numeric2Binary

Converts a numeric variable into a binary one


Description

Converts a numeric variable into a binary one using a cut point

Usage

Numeric2Binary(y, name= "MyVar", cut = NULL)

Arguments

y

Vector containing the numeric values

name

Name of the variable

cut

Cut point to cut the values of the variable. If is NULL the median is used.

Details

Converts a numeric variable into a binary one using a cut point. If the cut is NULL the median is used.

Value

A binary Variable

Author(s)

Jose Luis Vicente-Villardon

See Also

Dataframe2BinaryMatrix

Examples

y=c(1, 1.2, 3.2, 2.4, 1.7, 2.2, 2.7, 3.1)
Numeric2Binary(y)

MultBiplotR

Multivariate Analysis Using Biplots in R

v1.3.30
GPL (>= 2)
Authors
Jose Luis Vicente-Villardon
Initial release
2021-03-30

We don't support your browser anymore

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