Learn R Programming

nonmemica (version 1.0.8)

as.best.default: Convert Vector to Best of Numeric or Character

Description

Convert vector to best of numeric or character.

Usage

# S3 method for default
as.best(x, prefix = "", na.strings = c(".", "NA", ""), ...)

Arguments

x

default

prefix

prefix for viewing numerics

na.strings

strings that should be treated as NA

...

ignored

Details

Converts vector to numeric if doing so creates no new NA; otherwise to character. Number-like vectors that are nevertheless character are prefixed by default to make this explicit when viewing only a few rows.

See Also

Other util: %contains%(), as.best(), enclose(), locf(), padded(), parens(), pool(), runhead(), text2decimal()