Reval.Rd
This function evaluates a string as an R expression.
Reval(Rstring, print.string=TRUE, n.eval.parent=1)
# Reval( print(Rstring) )
Revalpr(Rstring, print.string=TRUE)
# Reval( print(str(Rstring)) )
Revalprstr(Rstring, print.string=TRUE)
# Reval( print(round(Rstring, digits)) )
Revalpr_round( Rstring, digits=5, print.string=TRUE)
# Reval( print(max(abs(Rstring_x - Rstring_y)) ) )
Revalpr_maxabs( Rstring_x, Rstring_y, print.string=TRUE, na.rm=FALSE)
String which shall be evaluated in R
Should the string printed on the console?
Index of parent environment in which the R command should be evaluated.
Number of digits after decimal.
String corresponding to an R object
String corresponding to an R object
Logical indicating whether missing values should be removed from calculation
The string is evaluated in the parent environment. See
base::eval
for the definition of environments in R.
# This function is simply a shortage function
# See the definition of this function:
Reval <- function( Rstring, print.string=TRUE){
if (print.string){ cat( paste( Rstring ), "\n" ) }
eval.parent( parse( text=paste( Rstring )), n=1 )
}
Reval( "a <- 2^3" )
## a <- 2^3
a
## [1] 8