Initializing help system before first use

Rgetreal

Rgetreal


Purpose
Get the real value of an R expression.
Synopsis
function Rgetreal(cmd:string):real
Argument
cmd 
Statements to evaluate
Return value
The result of the evaluation as a real.
Example
The following example retrieves the mean of the speed/dist ratios for the cars dataset into the variable realvar:
 realvar:=Rgetreal('mean(cars$speed/cars$dist)')
Further information
If cmd contains more than one statement, the returned value is the result of the last one. If the results is NA, then a NaN value is returned. The returned value is first converted to numeric within R.
Related topics