PruneVarName postprocesses a deparse(substitute(X)) type VarName assigned to an argument variable in a funcion. In a subscripted vector "V[1:3]" the brackets are deleted. In a subscripted data.frame "DF[, \"b\"]" b is extracted. From DF$b b is extracted. A function call around is preserved.

PruneVarName(str)

Arguments

str

is a string, typically the result of deparse(substitute(X))

Value

pruned string

Examples