[R] can one evaluate an expression in a comment? (or insert results into history?)
partha_bagchi@hgsi.com
partha_bagchi at hgsi.com
Mon Nov 8 23:07:04 CET 2004
Have you perchance looked at
?paste
For example:
> paste("The current time is ", date())
[1] "The current time is Mon Nov 08 17:06:25 2004"
>
<davidr at rhotrading.com>
Sent by: r-help-bounces at stat.math.ethz.ch
11/08/2004 04:47 PM
To: <r-help at stat.math.ethz.ch>
cc:
Subject: [R] can one evaluate an expression in a comment? (or insert results into
history?)
I'd like to insert (for example) the current datetime into a comment so
it goes into the history.
I can of course cut and paste the results of date() into a comment line,
but it would be easier and more powerful to be able to type something
like
> hstamp()
and have it go into the history.
More generally, I would like to put any expression to be evaluated into
this function.
For example,
> hstamp(memory.size(TRUE))
would insert a comment like
# 12279808
after the hstamp command into the history.
Probably one should avoid any expressions with assignment effects or
large amounts of output.
Maybe I'm thinking about this all wrong, so please enlighten me if so.
I searched all the help and archives as well as I could.
--------------
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status Patched
major 2
minor 0.0
year 2004
month 10
day 18
language R
Thanks!
David L. Reiner
Rho Trading
440 S. LaSalle St -- Suite 620
Chicago IL 60605
312-362-4963 (voice)
312-362-4941 (fax)
[[alternative HTML version deleted]]
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list