Learn R Programming

mclm (version 0.2.7)

as_numeric: Coerce object to a numeric vector

Description

This generic method turns its first argument x or at least part of the information in it into a numeric object. It is an alternative notation for base::as.numeric().

Usage

as_numeric(x, ...)

# S3 method for default as_numeric(x, ...)

Value

A numeric vector.

Arguments

x

An object to coerce.

...

Additional arguments.

Examples

Run this code
(flist <- freqlist(tokenize("The old story of the old man and the sea.")))

# extract frequency counts from a frequency list
as_numeric(flist)
as.numeric(flist)

# preferable alternative
type_freqs(flist)

Run the code above in your browser using DataLab