Learn R Programming

spup (version 1.4-0)

list_depth: Function to find the level of list nesting

Description

Function to find the level of list nesting

Usage

list_depth(List)

Value

an integer; level of list nesting

Arguments

List

an object of class 'list'.

Author

Kasia Sawicka

Examples

Run this code

a <- list(1,2)
list_depth(a)

a <- list(list(1, 2), 3)
list_depth(a)

Run the code above in your browser using DataLab