On 02-06-2013, at 08:08, Matt Stati <mattst...@yahoo.com> wrote:

>> From my larger data set I created a subset of it by using: 
> 
> subset_1 <- subset(timeuse, IndepTrans = 1, Physical = 1)
> 
> where my larger data set is "timeuse" and the smaller subset is "subset_1". 
> The subset was conditioned on "IndepTrans" equaling "1" in the data and 
> "Physical" equaling "1" as well. I want to be able to compute the median of a 
> variable first for the larger data set "timeuse" then for the subset file 
> "subset_1". How do I identify to R which data set I'm wanting the median 
> computed for? I've tried many possibilities but for some reason can't figure 
> it out. 


?with

with(timeuse, median(…))
with(subset_1, median(…))

Berend

______________________________________________
R-help@r-project.org 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 via email to