Learn R Programming

toolbox (version 0.1.1)

castNumeric: Convert strings to numeric if possible, otherwise remains as is.

Description

Convert strings to numeric if possible, otherwise remains as is.

Usage

castNumeric(x)

Value

A string, converted to numeric if possible.

Arguments

x

A string.

Examples

Run this code
castNumeric("100")

Run the code above in your browser using DataLab