Dear R-helpers,

I know how to use unique to select unique rows, e.g.

unique.rows<-unique(dataframe)

but I would like to select those rows that are unique only only TWO of my
dataframe's columns (so, two rows with the same value on these two columns
would not be kept, even if they had different values in other columns).

For example, I have a dataframe with 10 columns, two of which are LATITUDE
and LONGITUDE. I wish to keep only one row per unique combination of these
two columns, so I've tried:

unique.latlong<-extracted[unique(paste(extracted$latitude,extracted$longitude)),]

but this is returning a dataframe of missing values (NAs).

Could anyone point me in the right direction?

Thanks! Mark Na

	[[alternative HTML version deleted]]


