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

2014-04-08 Thread mamuash bukana
Many thanks to you all; specially to Frede. which(3ddata$variablename>=x,arr.ind=TRUE) answers my question perfectly. Cheers! Bukana On Tue, Apr 8, 2014 at 11:33 AM, Frede Aakmann Tøgersen wrote: > Hi > > I know there is a arr.index (or something like that, I'm not near my R > right now) argum

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

2014-04-08 Thread Frede Aakmann Tøgersen
Sorry forgot to mention that you probably are better of using <= and >= instead of == Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: mamuash bukana Dato:08/04/2014 15.51 (GMT+01:00) Til: r-help@r-project.org Emne: [R] locating a data value in 3-dimensional data

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

2014-04-08 Thread Frede Aakmann Tøgersen
Hi I know there is a arr.index (or something like that, I'm not near my R right now) argument to which (). I have used it for 2-dim arrays and never for higher dimensions. But try it out by setting the argument to TRUE. Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse -

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

2014-04-08 Thread Kehl Dániel
Dear Mamuash Bukana, is this a data frame with variable names you indicated? you will need something like which(dataframename$variablename == x) but if you have more you might use > HTH kd Feladó: r-help-boun...@r-project.org [r-help-boun...@r-project.or

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

2014-04-08 Thread S Ellison
> 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