it in time, you can call your function and let the
REPL display it (or not) and yet save the value.
-Original Message-
From: R-help On Behalf Of Jeff Newmiller via
R-help
Sent: Tuesday, March 26, 2024 1:03 AM
To: r-help@r-project.org
Subject: Re: [R] Printout and saved results
Your desir
: Tuesday, March 26, 2024 1:03 AM
To: r-help@r-project.org
Subject: Re: [R] Printout and saved results
Your desire is not unusual among novices... but it is really not a good idea
for your function to be making those decisions. Look at how R does things:
The lm function prints nothing... it retur
Your desire is not unusual among novices... but it is really not a good idea
for your function to be making those decisions. Look at how R does things:
The lm function prints nothing... it returns an object containing the result of
a linear regression. If you happen to call it directly from the
I just like the subroutine to spit out results (Mean, Std.dev, etc.) and
also be able to access the results for further processing, i.e.,
v$Mean
v$Std.dev
On 3/26/2024 11:24 AM, Richard O'Keefe wrote:
Not clear what you mean by "saved".
If you call a function and the result is printed, the re
Not clear what you mean by "saved".
If you call a function and the result is printed, the result is
remembered for a wee while in
the variable .Last.value, so you can do
> function.with.interesting.result(...)
> retained.interesting.result <- .Last.value
or even
> .Last.value -> retained.intere
How can I have both printout and saved results at the same time.
The subroutine first return "out" and the printout gets printed, but not
saved.
I then run the "invisible" line. Results got saved and accessible but no
printout.
How can I have both printout and also have the results saved? T
6 matches
Mail list logo