fixBorders {niarules} | R Documentation |
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.
fixBorders(vector)
vector |
A numeric vector to be processed. |
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.
original_vector <- c(1.19007417, 0.33135271, -0.5, 1.5, 0.0)
fixed_vector <- fixBorders(original_vector)
print(fixed_vector)