Learn R Programming

rgp (version 0.4-1)

extractAttributes: Extract a given attribute of all objects in a list and tag that list with the list of extracted attributes

Description

Extract a given attribute of all objects in a list and tag that list with the list of extracted attributes

Usage

extractAttributes(x, extractAttribute, tagAttribute = extractAttribute, default = NULL)

Arguments

x
A list with objects containing the attribute attribute.
extractAttribute
The attribute to extract from all objects in the list x.
tagAttribute
The name of the attribute for x holding the list of extracted attributes.
default
A default value to return if an object in x has no attribute attribute.

Value

The list x, tagged with a new attribute tagAttribute.