Hi: Take a look a Sweave....> library(tools) > ?SweaveOr at the R News 2/3 December 2003. On Tue, 6 May 2003 MZodet at ahrq.gov wrote:> Is there any such thing as a program file in R? That is, is it possible to > compile and save code for performing data management and analytic tasks for > a given project into a single/multiple file(s) (i.e., like a script file > (S-Plus), a do file (STATA), or a *.sas file (SAS))? > > Any words of wisdom or a point in the direction of some documentation would > be helpful. If it is not possible to work with such files I would not mind > some advice on how I should be thinking about organizing my work differently > in R compared to these other programs. Typically, I provide relatively > thorough project documentation in my program files so that if someone else > inherits them they can pick-up on them quickly. > > Thanks. > > Marc > > Marc W. Zodet, MS > Health Statistician > Agency for Healthcare Research and Quality > Rockville, Maryland 20841 > mzodet at ahrq.gov > > [[alternate HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >-- Ulises M. Alvarez LAB. DE ONDAS DE CHOQUE FISICA APLICADA Y TECNOLOGIA AVANZADA UNAM umalvarez at fata.unam.mx
Is there any such thing as a program file in R? That is, is it possible to compile and save code for performing data management and analytic tasks for a given project into a single/multiple file(s) (i.e., like a script file (S-Plus), a do file (STATA), or a *.sas file (SAS))? Any words of wisdom or a point in the direction of some documentation would be helpful. If it is not possible to work with such files I would not mind some advice on how I should be thinking about organizing my work differently in R compared to these other programs. Typically, I provide relatively thorough project documentation in my program files so that if someone else inherits them they can pick-up on them quickly. Thanks. Marc Marc W. Zodet, MS Health Statistician Agency for Healthcare Research and Quality Rockville, Maryland 20841 mzodet@ahrq.gov [[alternate HTML version deleted]]
Dear Marc,
Perhaps the source function might help (?source).
Say you save your program file as myprog.r then from within R you would type
source("myprog.r")
Hope that this helps,
Saghir
> -----Original Message-----
> From: MZodet@ahrq.gov [SMTP:MZodet@ahrq.gov]
> Sent: Wednesday, 07 May, 2003 5:32 AM
> To: r-help@stat.math.ethz.ch
> Subject: [R] "Program" files
>
> Is there any such thing as a program file in R? That is, is it possible
> to
> compile and save code for performing data management and analytic tasks
> for
> a given project into a single/multiple file(s) (i.e., like a script file
> (S-Plus), a do file (STATA), or a *.sas file (SAS))?
>
> Any words of wisdom or a point in the direction of some documentation
> would
> be helpful. If it is not possible to work with such files I would not
> mind
> some advice on how I should be thinking about organizing my work
> differently
> in R compared to these other programs. Typically, I provide relatively
> thorough project documentation in my program files so that if someone else
> inherits them they can pick-up on them quickly.
>
> Thanks.
>
> Marc
>
> Marc W. Zodet, MS
> Health Statistician
> Agency for Healthcare Research and Quality
> Rockville, Maryland 20841
> mzodet@ahrq.gov
>
> [[alternate HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
>
---------------------------------------------------------
Legal Notice: This electronic mail and its attachments are inten... {{dropped}}