Skip to content

select a row in a data.frame

2 messages · Dan Putler, Fernando Miguez

#
Hi Gianni,

First the chide, you are asking a general (very beginner) R question on
the Geospatial Special Interest Group mailing list, which isn't the
right list for your question. The closest to the correct list is R-Help,
but this is really something one learns from books on R, which there are
a number of, and often available in online in PDF (start with An
Introduction to R, http://cran.r-project.org/doc/manuals/R-intro.pdf).

Now the answer to your question:

BestResult_R <- newData[newData$result == max(newData$result), ]

Dan Putler
On Tue, 2009-10-13 at 16:59 -0700, gianni lavaredo wrote:
#
Hi Gianni,

See also which.max

Fernando
Dan Putler wrote: