as.type: Set column type as stored in variable

Description Usage Arguments Value Examples

View source: R/astype.R

Description

For instance to allow to return an object of the same type as was provided.

Usage

1

Arguments

vector

Object to be converted.

type

Type in string, e.g., "factor".

Value

Object x, converted to target type.

Examples

1
2
type <- "factor"
as.type(mtcars$mpg, "character")

julianbarg/DataAnalysisTools documentation built on April 9, 2020, 11:43 a.m.