Re: [R] aggregate taking way too long to count.

2009-02-10 Thread Seeliger . Curt
so useful, but may wait for another day. Enjoy the days, cur -- Curt Seeliger, Data Ranger Raytheon Information Services - Contractor to ORD seeliger.c...@epa.gov 541/754-4638 "William Dunlap" wrote on 02/10/2009 03:17:40 PM: > [image removed] > > Re: [R] aggregat

Re: [R] aggregate taking way too long to count.

2009-02-10 Thread William Dunlap
To quickly see if any duplicates exist you could use table() and checking for entries that are more than 1. Use na.omit() on the entire data.frame before passing it to table. E.g., tmp <- with(na.omit(df1), table(parameter, station, site)) sum(tmp>1) # number of parameter/station/site keys

[R] aggregate taking way too long to count.

2009-02-10 Thread Seeliger . Curt
Folks, I'm checking the structure of a dataframe for duplicate parameters at a site station (i.e depth should be measured once, not twice), using aggregate to count each parameter within a site station. The fake data below has only 26000 rows, and takes roughly 14 seconds. My real data has 7