Learn R Programming

FastUtils (version 0.2.1)

tableToNumeric: Convert a Table to Numeric

Description

This function converts a table to a numeric vector.

Usage

tableToNumeric(x)

Value

A numeric vector with names preserved from the table.

Arguments

x

A table to be converted.

Examples

Run this code
# Convert a table to numeric
tbl <- table(c("a", "b", "a"))
tableToNumeric(tbl)

Run the code above in your browser using DataLab