Learn R Programming

wyz.code.offensiveProgramming (version 1.1.24)

FunctionParameterName: Function parameter name

Description

Class to define and handle a function parameter

Usage

FunctionParameterName(name_s_1)

Value

An object that is an R

environment. Use functions isSemanticName, isPolymorphic, isEllipsis, isValid to check the provided name. Functions get* allows to retrieve parts of the name.

Arguments

name_s_1

a string that is the name of the parameter

Author

tools:::Rd_package_author("wyz.code.offensiveProgramming")

Maintainer: tools:::Rd_package_maintainer("wyz.code.offensiveProgramming")

Details

The name of the parameter should be a semantic name. A semantic name is a compound string based on a special format allowing to distinguish by the name, the parameter type, and to express some length constraints.

See Also

Refer to defineEvaluationModes.

Examples

Run this code
##---- typical case ----
fpn <- FunctionParameterName('values_s_7m')
fpn$isPolymorphic()
fpn$isSemanticName()
fpn$isValid()
fpn$getTypeSuffix() # 's'
fpn$getLengthSpecification() # '7m'
fpn$getLengthSuffix() # 7
fpn$getLengthModifier() # 'm'

fpn <- FunctionParameterName('object_')
fpn$isPolymorphic()
fpn$isSemanticName()
fpn$isValid()

Run the code above in your browser using DataLab