[R] locating a data value in 3-dimensional data set

S Ellison S.Ellison at LGCGroup.com
Tue Apr 8 16:04:37 CEST 2014


> I tried:
> which(3ddata==x) # 3ddata is name of data set, x is the observed extreme
> value But this couldn't help me.

You'll need which(3ddata$long==x) if 3ddata is a data frame* with columns long, lat, time, or something like 3ddata[ ,'long'] if it's a matrix with dimnames or [,1] if just a matrix.

But you'll be better off with >=x if the values are floating point; see R FAQ 7.31

*clearly, '3ddata' cannot be a data frame name - it's not legal R. I assume you have some legal name for it.




*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}




More information about the R-help mailing list