What I need is a way of checking my df to see if I have enough data to run some functions. I would like to know how to delete an entire "market" if there is not enough data for that particular market. For example, I would like to delete ALL of AD3 because I only have 2 complete lines of data when I require 4. In my real case I am looking to delete any market with less than 23 lines of data and I have 100+ markets.

Here is the `dput()` of a small bit off my data.

```
data<-structure(list(market = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 
2L, 3L, 3L), .Label = c("AD1", "AD2", "AD3"), class = "factor"), 
date = structure(c(15623, 15624, 15625, 15628, 15623, 15624, 
15625, 15628, 15625, 15628), class = "Date"), open = c(101.52, 
101.68, 102.1, 101.99, 100.73, 100.85, 101.57, 101.01, 100.56, 
100.42), high = c(102.07, 102.39, 102.36, 102.07, 101.4, 
101.59, 101.62, 101.35, 100.56, 100.71), low = c(101.26, 
101.56, 101.63, 101.5, 100.59, 100.85, 101.07, 100.97, 100.56, 
100.41), last = c(101.78, 102.08, 101.76, 101.91, 101.08, 
101.37, 101.06, 101.21, 100.41, 100.56)), .Names = c("market", 
"date", "open", "high", "low", "last"), row.names = c(1L, 2L, 
3L, 4L, 5L, 6L, 7L, 8L, 11L, 12L), class = "data.frame", na.action = structure(9:10,.Names = c("9", 
"10"), class = "omit"))

```

My 100+ markets are in 1 data frame. So if I have 22 lines of data I need to delete all 22 lines associated with that particular "market" name.