Quantcast

"source" option

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

"source" option

ivo welch
Dear R experts---has someone written a wrapper for the "source" function
that opens a sink file in the same name as the .R file and closes it at the
end (including when there is an error that aborts)?  the first part is
easy, but I am not sure how to not patch myself an empty sink() after any R
program print/abort sequences have played out.

besides, "sink=TRUE, split=TRUE" could be a nice additional option to
"source".

sincerely,

/iaw

----
Ivo Welch ([hidden email])

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: "source" option

Jim Lemon
On 03/24/2012 07:22 AM, ivo welch wrote:
> Dear R experts---has someone written a wrapper for the "source" function
> that opens a sink file in the same name as the .R file and closes it at the
> end (including when there is an error that aborts)?  the first part is
> easy, but I am not sure how to not patch myself an empty sink() after any R
> program print/abort sequences have played out.
>
> besides, "sink=TRUE, split=TRUE" could be a nice additional option to
> "source".
>
Hi ivo,
Have a look at the htmlize function in the prettyR package. This opens
an HTML file with the same name as the R source file by default. The
code should be easy to adapt.

Jim

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...