Q:

Remove lines with efficient way

I have a data frame named df:
number          value
1                  5
2                  5
3                  5
4                  6
5                  6
6                  6
7                  6
8                  7 
9                  7
10                7
11                7
12                7
13                8  
14                9 
15                9

I want to remove specific rows in case of a min and max level.  I tried separate this:
df[df$value>5 , ]

and after that this:
df[df$value>8 , ]

After I tried this: 
df[df$value>5 & df$value>8, ]

but it execute online the df$value>8
and another problem I observed is that when I type 
 df[df$value>5, ]

it eliminate the value however when I type df it contains the values I tried to remove before.  What could be wrong and I don’t take a clear data frames without the removed values? 
An example of the output data: 
 number          value
 4                  6
 5                  6
 6                  6
 7                  6
 8                  7 
 9                  7
 10                7
 11                7
 12                7

A:

If you want remove lines with level lower than min and higher than max, try this:
df[df$value<5 | df$value>8, ]

Edit
Look right code:
df <- df[df$value>5 & df$value<8,]

Its work for me.