Duncan Murdoch <[EMAIL PROTECTED]> wrote:
> I think Gabor has answered your question directly, but another
> approach to solve the same underlying problem might be to work with
> Sweave. (Or ODFweave, etc.)
Thank you, that is pretty marvelous. I will use it next time around.
-tom
--
---
On 12/2/2007 6:24 PM, Tom Sgouros wrote:
> Hello all:
>
> I have a function that writes a fairly elaborate report based on some
> survey data. For documentation and bookkeeping purposes, I'd like to
> write out in the report the function call that produced the report, or
> at least enough informa
Use format:
f <- function(x) {
format(match.call())
}
f(pi + 3)
On Dec 2, 2007 8:46 PM, tom sgouros <[EMAIL PROTECTED]> wrote:
>
> Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
>
> > Try this:
> >
> > > survey.write <- function(x) {
> > +print(match.call())
> > +x
> > + }
> > >
Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> Try this:
>
> > survey.write <- function(x) {
> +print(match.call())
> +x
> + }
> > out <- survey.write(pi+3)
> survey.write(x = pi + 3)
That's exactly what I need. Thank you.
But now, another question. I can't seem to get the value ret
Try this:
> survey.write <- function(x) {
+print(match.call())
+x
+ }
> out <- survey.write(pi+3)
survey.write(x = pi + 3)
On Dec 2, 2007 6:55 PM, tom sgouros <[EMAIL PROTECTED]> wrote:
>
>
> Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
>
> > If what you mean is that you have a file, te
Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> If what you mean is that you have a file, test.R, of R commands
> and you are using source("test.R") and you wish to discover the
> name "test.R" without hard coding it in your file, then place this in
> test.R:
>
> ofile <- parent.frame(2)$ofile
If what you mean is that you have a file, test.R, of R commands
and you are using source("test.R") and you wish to discover the
name "test.R" without hard coding it in your file, then place this in
test.R:
ofile <- parent.frame(2)$ofile
and ofile will be set to "test.R". Note that the line shown
Hello all:
I have a function that writes a fairly elaborate report based on some
survey data. For documentation and bookkeeping purposes, I'd like to
write out in the report the function call that produced the report, or
at least enough information to help me recreate the steps that led to
that
8 matches
Mail list logo