Learn R Programming

tis (version 1.39)

asClassyList: Convert a vector into a list of objects with the same class

Description

Turns its argument into a list of elements with the same class as the argument.

Usage

asClassyList(x, …)

Arguments

x

object to be coerced or tested.

objects, possibly named.

Value

A list L of one-element vectors with L[[i]] == x[i] for i in 1:length(x)

See Also

as.list

Examples

Run this code
# NOT RUN {
  asClassyList(today() + 1:5)
# }

Run the code above in your browser using DataLab