Learn R Programming

webdeveloper (version 0.1.0)

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)

Arguments

x

A string.

Value

A string, converted to numeric if possible.

Examples

Run this code
# NOT RUN {
castNumeric("100")
# }

Run the code above in your browser using DataLab