[R] extract required data from already read data

Joshua Wiley jwiley.psych at gmail.com
Sun May 9 08:22:14 CEST 2010


On Thu, May 6, 2010 at 10:47 PM, Mohan L <l.mohanphy at gmail.com> wrote:
>
>
<snip>
>
> I am using source() to run program, like
>
>> source (sample.R)
>
> I want to know how to pass the argument to my sample.R, some this like
>
>> source(sample.R, xxx,FeMale)
>
>  Is it possible? any link will greatly appreciated.

I do not believe that you can pass arguments to source() that you want
to be passed to some function inside of the file or connection being
sourced.  Perhaps turn the contents of the file you are sourcing in
into a function, and then call that function from the command line and
pass the arguments you want to it?

Josh

>
> Thanks & Rg
> Mohan L
>


-- 
Joshua Wiley
Senior in Psychology
University of California, Riverside
http://www.joshuawiley.com/



More information about the R-help mailing list