as.best: Convert to Best of Numeric or Character

View source: R/util.R

as.bestR Documentation

Convert to Best of Numeric or Character

Description

Convert to best of numeric or character.

Convert data.frame columns to best of numeric or character.

Usage

as.best(x, ...)

## S3 method for class 'data.frame'
as.best(x, prefix = "#", ...)

Arguments

x

data.frame

...

passed arguments

prefix

character to prepend to values in mixed numeric/character columns

Details

Converts to numeric if doing so creates no new NA; otherwise to character.

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

Value

data.frame

Methods (by class)

  • as.best(data.frame): data.frame method

See Also

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

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


bergsmat/nonmemica documentation built on Sept. 15, 2023, 9:22 a.m.