getListElement: Get element of a list of lists

Description Usage Arguments Value Note Examples

Description

Get descriptive strings to complement stats datasets. Useful for human readable output such as plots or tables.

Usage

1
getListElement(list_, level = 1)

Arguments

list_

A list of lists of which sublist elements should be extracted

level

Which sub-element should be extracted? Defaults to 1, can be numeric or the name of a named sublist.

Value

vector of the elements of the specified sublist, unnamed and unlisted.

Note

This is not really necessary.

Examples

1
2
3
itemsJSON    <- jsonlite::fromJSON("http://assets.wurstmineberg.de/json/items.json")
itemData     <- data.frame(numID = names(itemsJSON))
itemData$ID  <- getListElement(itemsJSON, "id")

jemus42/wurstmineR documentation built on May 19, 2019, 4:03 a.m.