getAttributeNames: Find Names of Attributes Queried and Set in R Code

View source: R/getAttributeNames.R

getAttributeNamesR Documentation

Find Names of Attributes Queried and Set in R Code

Description

This finds names that are literal strings in the calls to attr, attributes (and their assignment equivalents) and structure.

It currently doesn't do constant propagation, look backs or inference to handle indirect references to attributes, i.e., via a variable containing the attribute name.

Usage

getAttributeNames(x)

Arguments

x

the R code object to analyze

Value

A character vector giving the names of the attributes found in the code. The name of each element of the character vector indicates the function in which that attribute names was found.

Author(s)

Duncan Temple Lang

See Also

findCallsTo findUsedOptions

Examples

  getAttributeNames(tools:::.install_packages)

  getAttributeNames(tools::prepare_Rd)

duncantl/CodeAnalysis documentation built on June 12, 2025, 6:44 a.m.