I downloaded the code, as Duncan Murdoch suggested. I also used sink() as
suggested by others and found that the two methods gave identical results. I
then fixed the bug in a private file and tried it out on a number of
examples. It now seems to work fine, as far as I can tell.
>From CRAN, I foun
On 08/04/2010 5:16 PM, David.Epstein wrote:
There is quite a long piece of code defining a certain function in one of the
R packages.
I think the code has a bug and I want to get the code into a file so that I
can take a proper look, and possibly fix it.
how does one do this? (I mean getting the
Hi David,
You can use sink, like this:
sink(file="lm.R") ## redirects output to the file lm.R
print(lm) #prints the lm function
sink() #r redirects output back to the console.
Or just download the source...
-Ista
On Thu, Apr 8, 2010 at 10:16 PM, David.Epstein
wrote:
>
> There is quite a long pi
David -
You can do what you want pretty easily using sink.
Suppose you want the source code for function "blah"
in the file "blah.func":
sink('blah.func')
print(blah)
sink()
- Phil Spector
Statistical Computing F
There is quite a long piece of code defining a certain function in one of the
R packages.
I think the code has a bug and I want to get the code into a file so that I
can take a proper look, and possibly fix it.
how does one do this? (I mean getting the code into a file, not fixing the
bug.) I sup
5 matches
Mail list logo