When calling a script, I want to print the code expressions and their
results using echo=T as in:

> source("myscript.r", echo = T)

This seems to do pretty much same as print() if the script only lists
expressions like "mean(data)", and echo seems nicer since it avoids extra
print statements.

But when I use the same expressions inside a for loop (to process multiple
files), only code expressions and no results are echoed back.

My questions:
Does "echo=T" not print results of functions in loops?
What the major difference between echo and print?

Thanks!

        [[alternative HTML version deleted]]

______________________________________________
[email protected] 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