A base R option with subset
> subset(df,!(volume==0 & c(TRUE,diff(price)==0)))
Symbol Date volume price
1 A 2014-01-01 1 5
2 A 2014-01-02 3 8
3 A 2014-01-03 7 4
6 A 2014-01-07 3 6
7 A 2014-01-08 34 7
8 A 2014-01-09 45 34
9 A 2014-01-10 4 5
10 A 2014-01-11 9 7
13 A 2014-01-14 8 6
14 A 2014-01-15 4 4
15 A 2014-01-16 0 7
16 A 2014-01-17 4 7
A data.table
option
> setDT(df)[!(volume==0 & c(TRUE,diff(price)==0))]
Symbol Date volume price
1: A 2014-01-01 1 5
2: A 2014-01-02 3 8
3: A 2014-01-03 7 4
4: A 2014-01-07 3 6
5: A 2014-01-08 34 7
6: A 2014-01-09 45 34
7: A 2014-01-10 4 5
8: A 2014-01-11 9 7
9: A 2014-01-14 8 6
10: A 2014-01-15 4 4
11: A 2014-01-16 0 7
12: A 2014-01-17 4 7
Data
> dput(df)
structure(list(Symbol = c("A", "A", "A", "A", "A", "A", "A",
"A", "A", "A", "A", "A", "A", "A", "A", "A"), Date = c("2014-01-01",
"2014-01-02", "2014-01-03", "2014-01-05", "2014-01-06", "2014-01-07",
"2014-01-08", "2014-01-09", "2014-01-10", "2014-01-11", "2014-01-12",
"2014-01-13", "2014-01-14", "2014-01-15", "2014-01-16", "2014-01-17"
), volume = c(1L, 3L, 7L, 0L, 0L, 3L, 34L, 45L, 4L, 9L, 0L, 0L,
8L, 4L, 0L, 4L), price = c(5L, 8L, 4L, 4L, 4L, 6L, 7L, 34L, 5L,
7L, 7L, 7L, 6L, 4L, 7L, 7L)), class = "data.frame", row.names = c(NA,
-16L))