[R] How top print intermediate values from inside a function?
Ravi Varadhan
rvaradha at jhsph.edu
Mon Nov 25 23:37:46 CET 2002
Hi:
I tried both "print(mh.new)" and "cat(mh.new)", but the results are
displayed only after all the computations inside the function are
completed. Is there a way to display the intermediate variable
immediately after it is evaluated?
thanks again,
Ravi.
----- Original Message -----
From: rossini at blindglobe.net (A.J. Rossini)
Date: Monday, November 25, 2002 5:15 pm
Subject: Re: [R] How top print intermediate values from inside a
function?
> >>>>> "ravi" == Ravi Varadhan <rvaradha at jhsph.edu> writes:
>
>
> ravi> In R, how do I display some intermediate results
> calculated in a "for"
> ravi> loop within a function? For example, in the attached
> code, how do I
> ravi> get it to print the intermediate variable "mh.new" for
> each simulation,
> ravi> when I call the function "MHsim.ind"?
>
> other than print(mh.new) or cat(mh.new) ?
>
> --
> A.J. Rossini Rsrch. Asst. Prof. of
> BiostatisticsU. of Washington Biostatistics
> rossini at u.washington.edu FHCRC/SCHARP/HIV Vaccine Trials
> Net rossini at scharp.org--------------
> http://software.biostat.washington.edu/ ----------------
> FHCRC: M: 206-667-7025 (fax=4812)|Voicemail is pretty sketchy/use
> EmailUW: Th: 206-543-1044 (fax=3286)|Change last 4 digits of
> phone to FAX
> (my tuesday/wednesday/friday locations are completely unpredictable.)
>
>
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list