Skip to content
Snippets Groups Projects
depth.R 199 B
Newer Older
  • Learn to ignore specific revisions
  • pbac's avatar
    pbac committed
    #' Depth of a list
    #'
    #' Returns the depth of a list
    #' @title Depth of a list
    #' @param this list
    #' @return integer
    depth <- function(this) ifelse(is.list(this), 1L + max(sapply(this, depth)), 0L)