[R] Calculating First Occurance by a factor

jwg20 jason.gullifer at gmail.com
Wed Apr 1 22:30:54 CEST 2009


Thanks! That did it. I should have seen that I needed the comma! 



hadley wrote:
> 
>> I tried messing with the line df$FixTime[which.min(df$FixInx)] changing
>> it
>> to df[which.min(df$FixInx)] or adding new lines with the additional
>> columns
>> that I want to include, but nothing seemed to work. I'll admit I only
>> have a
>> mild understanding of what is going on with the function .fun. :-)
> 
> You probably want:
> 
> df[which.min(df$FixInx), ]
> 
> Hadley
> 
> -- 
> http://had.co.nz/
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Calculating-First-Occurance-by-a-factor-tp22789964p22834747.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list