ufs (version 0.5.12)

convertToNumeric: Conveniently convert vectors to numeric

Description

Tries to 'smartly' convert factor and character vectors to numeric.

Usage

convertToNumeric(vector, byFactorLabel = FALSE)

Value

The converted vector.

Arguments

vector

The vector to convert.

byFactorLabel

When converting factors, whether to do this by their label value (TRUE) or their level value (FALSE).

Examples

Run this code
ufs::convertToNumeric(as.character(1:8));

Run the code above in your browser using DataLab