Learn R Programming

topolow (version 2.0.1)

extract_numeric_values: Utility functions for the topolow package Extract Numeric Values from Mixed Data

Description

Extracts numeric values from data that may contain threshold indicators (e.g., "<10", ">1280") or regular numeric values.

Usage

extract_numeric_values(x)

Value

A numeric vector with threshold indicators converted to their numeric equivalents.

Arguments

x

A vector that may contain numeric values, character strings with threshold indicators, or a mix of both.

Examples

Run this code
# Mixed data with threshold indicators
mixed_data <- c(10, 20, "<5", ">100", 50)
extract_numeric_values(mixed_data)

Run the code above in your browser using DataLab