Learn R Programming

vegtable (version 0.1.3)

as.list: Coerce an S4 object to a list.

Description

Coercion used to explore content in S4 objects.

Usage

# S4 method for vegtable
as.list(x, ...)

# S4 method for coverconvert as.list(x, ...)

Arguments

x

an object of class '>coverconvert or '>vegtable

...

further arguments passed from or to other methods.

Value

An object of class list.

Details

S4 objects will be coerced to lists, where each slot in the input object becomes a member of the output list. This way allows to explore content and solve problems when validity checks fail.

Examples

Run this code
# NOT RUN {
## Importing 'Easplist' from taxlist
library(taxlist)
data(Easplist)

## Head of slot 'taxonNames'
class(Easplist)
head(Easplist@taxonNames)

## The same after coercing to list
Easplist <- as.list(Easplist)
class(Easplist)
head(Easplist$taxonNames)
# }

Run the code above in your browser using DataLab