coerce_each: Coerce each elements of a container class from one class to a...

Description Usage Arguments Value Examples

View source: R/coerce_each.R

Description

Coerce each elements of a container class from one class to a different class

Usage

1
2
3
4
5
6
7
coerce_each(x, from, to)

## S3 method for class 'data.frame'
coerce_each(x, from, to)

## S3 method for class 'data.table'
coerce_each(x, from, to)

Arguments

x

A container object such as a list, data.frame or data.table

from

A character vector containing the classes to coerce from

to

A character vector containing

Value

An object with the same class as x

data.table

data.table

Examples

1
  coerce_each( iris,  "factor", "character" ) 

decisionpatterns/coercion documentation built on Nov. 4, 2019, 10:23 a.m.