I believe you will have to expain what you want more fully, as what you
requested appears to be exactly what source() does, to me anyway. Please
reread its help file more carefully perhaps?

-- Bert

On Tue, Feb 20, 2024 at 7:36 AM Steven Yen <st...@ntu.edu.tw> wrote:

> How can I call and include an external set of R codes, not necessarily a
> complete procedure (which can be include with a “source” command). Example:
>
> #I like to include and run the following lines residing in a file outside
> the main program:
>
> mydata<-transform(mydata,
> a<-b+c
> d<-e+f
> }
>
>
> Steven from iPhone
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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 via email to