Learn R Programming

ospsuite.utils (version 1.2.0)

toList: Make sure the object is a list

Description

Make sure the object is a list

Usage

toList(object)

Arguments

object

Object to be converted to a list.

Value

If is.list(object) == TRUE, returns the object; otherwise, list(object).

Examples

Run this code
# NOT RUN {
toList(list("a" = 1, "b" = 2))
toList(c("a" = 1, "b" = 2))

# }

Run the code above in your browser using DataLab