[R] Strange behaviour of paste

Oliver Bandel oliver at first.in-berlin.de
Sun Jan 11 11:50:16 CET 2009


Hello,


here I have some code, which behaves quite strange, IMHO.
There is a "res.txt" which will be collected before printing it.

There is a paste-statement, which has a comment at the end of the line,
which is this one: "# !!!!!HERE!!!!!".

If you throw out the first hash-mark "#" on that line,
the printout behaves like if it is done for each of the
for-loop iterations. If the hash mark will not be thrown out,
it behaves, as I would expect: done *once*, after the loop is finished.

I'm using "R version 2.7.1 (2008-06-23)" on Debian.

Can you please show me, what is going wrong here?


The code is not much, but too long (too many lines and
lines too long) for pasting it here, so I have placed
it here:

  http://www.first.in-berlin.de/trybug.R

Can you show me, why the behaviour differs so much,
when just removing that "#" ?!

Ciao,
  Oliver




More information about the R-help mailing list