Package 'utilitybeltlists'

Title: What the Package Does (One Line, Title Case)
Description: What the package does (one paragraph).
Authors: First Last [aut, cre] (YOUR-ORCID-ID)
Maintainer: First Last <[email protected]>
License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a license
Version: 0.0.0.9000
Built: 2024-10-27 02:47:47 UTC
Source: https://github.com/selkamand/utilitybeltlists

Help Index


Check if an object is a list of lists

Description

Check if an object is a list of lists

Usage

is_list_of_lists(object)

Arguments

object

any R object (anything)

Value

TRUE if object is a list of lists, FALSE if it is not. Any non-list elements will cause this function to return FALSE

See Also

Other nested_lists: list_of_lists_retrieve_second_level_property()


Retrieve element from sublist of nested list

Description

Retrieve element from sublist of nested list

Usage

list_of_lists_retrieve_second_level_property(
  list_of_lists,
  name_of_property,
  function_for_sublist_assertion = function(x) {     return(TRUE) }
)

Arguments

list_of_lists

A list containing at least one sublist lists (list)

name_of_property

The name of the property to retrieve. For example if your sublists have some element named 'petal_length', you could use name_of_property == petal_lengt h (string)

function_for_sublist_assertion

Some function that takes one argument (teach sublist) and returns TRUE/FALSE. Function is fed into an assertion. By default, no assertion is applied (function). This property is useful if you want to check all sublists are of a certain class.

Details

Will error if list is zero_length

Value

vector of the same length as the input list (vector)

See Also

Other nested_lists: is_list_of_lists()