attribute_as_name: Attribute as name

Description Usage Arguments Value Examples

View source: R/mtg_helpers.R

Description

This function is used to get the attribute as a character instead of an expression (e.g. attribute = Length) or an extract to the node (e.g. attribute = node$Length). It is used in a special context where we know the attribute will always be used to reference a node (i.e. data masking).

Usage

1
attribute_as_name(attribute)

Arguments

attribute

a quoted expression

Value

The attribute as a character

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
attribute_as_name(rlang::expr(Length))
attribute_as_name(rlang::expr(node$Length))
attribute_as_name(rlang::expr("Length"))

test = "Length"
attribute_as_name(rlang::expr(test))

## End(Not run)

VEZY/XploRer documentation built on Oct. 9, 2021, 10:05 p.m.