Learn R Programming

galgo (version 1.4)

as.list.Object: Convert a variable of class Object to a list

Description

Object variables behave as lists, however they are really enviroments. Sometimes it is necesary to use the variable as a list instead of an Object. This function converts the Object to a list.

Usage

as.list(x, ...)

Arguments

x

Variable of class Object

...

Other object to include

Value

Returns a list with values equivalent to the Object.

Examples

Run this code
# NOT RUN {
xO <- Object()
xO$var = "hello"
class(xO)
xOL <- as.list(xO)
xOL
class(xOL)

# }

Run the code above in your browser using DataLab