search for: exprb

Displaying 1 result from an estimated 1 matches for "exprb".

Did you mean: expr
2013 Dec 13
1
Proper way to drop 'srcref' from an expression created via substitute(function() ...)?
...$ : symbol function $ :Dotted pair list of 1 ..$ x: symbol $ : language 2 * x $ :Class 'srcref' atomic [1:8] 1 20 1 34 20 34 1 1 .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x00000000111feaf8> whereas this does not: > exprB <- substitute(a*x, list(a=2)) > print(exprB) 2 * x > str(as.list(exprB)) List of 3 $ : symbol * $ : num 2 $ : symbol x Second, what is the proper way to drop that 'srcref' element in 'exprA'? I can think of either exprC <- exprA exprC[[4L]] <- NULL or exprC &...