Learn R Programming

timeseriesdb (version 0.2.1)

getListDepth: Determine depth of a list

Description

This function recursively checks the depth of a list and returns an integer value of depth

Usage

getListDepth(this)

Arguments

this

an object of class list

Details

Hat tip to flodel at stackoverflow for suggesting this light weight way analyze depth of a nested list. Further complexity needs to be added to cover the fact that data.frame are lists, too. A more sophisticated recursive function can be found in the gatveys2 package.

References

http://stackoverflow.com/questions/13432863/determine-level-of-nesting-in-r