Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread Yihui Xie
Hi Charlie, Thanks a lot! Your "dark voodoo" really helps! And also, thanks so much to Duncan for your detailed explanation! Finally I used Charlie's trick to modify makeRweaveLatexCoderunner(), and has left parse() & deparse() untouched. Regards, Yihui -- Yihui Xie Phone: 515-294-6609 Web: htt

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread cls59
Yihui Xie wrote: > > > Thanks a lot, Charlie. What a coincidence -- I'm also working on > Sweave functions. parse() and deparse() can make the code more tidy > (they are used in source() and RweaveLatexRuncode()), > >> RweaveLatex > function () > { > list(setup = RweaveLatexSetup, ru

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread Duncan Murdoch
On 04/10/2009 6:07 PM, Yihui Xie wrote: Thanks a lot, Charlie. What a coincidence -- I'm also working on Sweave functions. parse() and deparse() can make the code more tidy (they are used in source() and RweaveLatexRuncode()), RweaveLatex function () { list(setup = RweaveLatexSetup, runcod

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread Yihui Xie
Thanks a lot, Charlie. What a coincidence -- I'm also working on Sweave functions. parse() and deparse() can make the code more tidy (they are used in source() and RweaveLatexRuncode()), > RweaveLatex function () { list(setup = RweaveLatexSetup, runcode = RweaveLatexRuncode, writedoc =

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread cls59
Duncan Murdoch-2 wrote: > > > Why not just modify their source, and rebuild R? > > Duncan Murdoch > > In my case, the IT guys don't always provide the necessary tools and/or permissions to do this. Which is why we are fortunate that R is so flexible as to allow modification of core routines

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread Duncan Murdoch
On 04/10/2009 12:41 PM, cls59 wrote: Yihui Xie wrote: Hi everyone, I want to modify two base R functions 'parse' and 'deparse' immediately after R has started, so I added some code in the file 'Rprofile.site' under the 'etc' directory. Here is a simple example: Why not just modify their sou

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread cls59
Yihui Xie wrote: > > Hi everyone, > > I want to modify two base R functions 'parse' and 'deparse' > immediately after R has started, so I added some code in the file > 'Rprofile.site' under the 'etc' directory. Here is a simple example: > > parse=function(...){ > base::parse(...) > } > >

[R] Modify base R functions in Rprofile.site

2009-10-03 Thread Yihui Xie
Hi everyone, I want to modify two base R functions 'parse' and 'deparse' immediately after R has started, so I added some code in the file 'Rprofile.site' under the 'etc' directory. Here is a simple example: parse=function(...){ base::parse(...) } I'll get an error when I start R as follows: