destructure-methods: Included Implementations of 'destructure'

Description Usage Arguments Details Value See Also

Description

zeallot includes destructure methods for the following classes: character, complex, Date, data.frame, and summary.lm. See details for how each object is transformed into a list.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S3 method for class 'character'
destructure(x)

## S3 method for class 'complex'
destructure(x)

## S3 method for class 'Date'
destructure(x)

## S3 method for class 'data.frame'
destructure(x)

## S3 method for class 'summary.lm'
destructure(x)

## Default S3 method:
destructure(x)

Arguments

x

An R object.

Details

character values are split into a list of individual characters.

complex values are split into a list of two values, the real and the imaginary part.

Date values are split into a list of three numeric values, the year, month, and day.

data.frame values are coerced into a list using as.list.

summary.lm values are coerced into a list of values, one element for each of the eleven values returned by summary.lm.

Value

A list of elements from x.

See Also

destructure


nteetor/allotalot documentation built on March 17, 2020, 10:22 a.m.