Skip to content

extract required data from already read data

5 messages · Mohan L, Joshua Wiley, David Winsemius

#
Try something like:

sample[which(sample$Domain==xxx & sample$sex==FeMale), ]

Hope that helps,

Josh
On Thu, May 6, 2010 at 10:04 PM, Mohan L <l.mohanphy at gmail.com> wrote:

  
    
#
On May 7, 2010, at 1:04 AM, Mohan L wrote:

            
I suspect you want to be working on an object like :

subset(sample, Domain=="xxx" & sex == "Male")
The && operator will not give you what you want. It only returns a  
single value and is unusable for selecting subsets. Go back and read  
the introductory material. This is explained.
David Winsemius, MD
West Hartford, CT
1 day later
#
On Thu, May 6, 2010 at 10:47 PM, Mohan L <l.mohanphy at gmail.com> wrote:
<snip>
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