Learn R Programming

deflist (version 0.2.0)

length.deflist: Retrieve the length of a deflist object

Description

Retrieve the length of a deflist object

Usage

# S3 method for deflist
length(x)

Value

The length of the deflist object.

Arguments

x

A deflist object.

Examples

Run this code
square_fun <- function(i) i^2
square_deflist <- deflist(square_fun, len = 5)
stopifnot(length(square_deflist) == 5)

Run the code above in your browser using DataLab