On 11-07-31 7:15 AM, Anthony Ching Ho Ng wrote:
Hello R-help,

I wonder if it is possible to configure R, so that it will
display/show the evaluation result of the R commands automatically
(similar to the behavior of Matlab)

It's open source so in theory anything is possible, but there's no built-in support for that.

i.e. If I type x<- 8

it will print 8 in the command prompt, instead of having type x
explicitly to show the result and perhaps put an ";" at the end to
suppress the output.

i.e. x<- 8;

If you wrap the assignment in parens the result is made visible, e.g.

(x <- 8)

will print if you enter it in the console. (It won't print if it's a line in a function; there you need an explicit call to print(). Only the value returned at the top level is eligible for auto-printing.)

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to