fixBorders {niarules}R Documentation

Fix Borders of a Numeric Vector

Description

This function takes a numeric vector as input and ensures that all values greater than 1.0 are set to 1.0, and all values less than 0.0 are set to 0.0.

Usage

fixBorders(vector)

Arguments

vector

A numeric vector to be processed.

Value

A numeric vector with borders fixed. Values greater than 1.0 are replaced with 1.0, and values less than 0.0 are replaced with 0.0.

Examples

original_vector <- c(1.19007417, 0.33135271, -0.5, 1.5, 0.0)
fixed_vector <- fixBorders(original_vector)
print(fixed_vector)


[Package niarules version 0.1.0 Index]