[R] how R outputs?
andy_liaw at merck.com
Thu Dec 16 14:46:36 CET 2004
If R is run in interactive mode; i.e., interactive() == TRUE, whatever
function calls that produced R objects gets printed (by calling the
appropriate print() method; known as auto-printing), unless the object is
returned invisibly (i.e., wrapped in invisible()). As an example, if you
into a file, then run that through R CMD BATCH, you will not see the output
printed. Also, auto-printing is off inside loops; e.g.,
for (I in 1:10) abs(-3)
will not show any output, even if you run it in an interactive session.
> From: xudongyuan
> Hi.All and R developers:
> When I look into the R source code, I have a
> question.Since R has its own data structure(i.e. SEXP),how
> does it convert the result to the normal output after it has
> computed? For example,when I input,
> I learned that in R's execution, the expression is parsed to
> a parse tree,and becomes a SEXP list. After "eval" function,
> the result is still a SEXP. But R outputs:
>  3
> The output is normal.So my question is how R makes its SEXP
> result into the normal result.Where can I find the place R
> makes this convertion in R's source code?Can anyone help me?
> dongyuan xu
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
More information about the R-help