Question: I have a dataframe which has data like:

```
col1    col2    col3
1       3       bob
2       1       alice
3       3       bob
4       3       rose

```

And what I want to do is keep duplicate rows of col2 and discard duplicates with greater than 1 instance of col3's value. Or put another way, duplicates of col2 but only where col3's values are different. So in the above example, what I would end up with is:

```
col1    col2    col3
1       3       bob
4       3       rose

```

Alice wouldn't be in the output because obviously there's no second value of col2's '1' - it isn't duplicate. The second entry of Bob (3 3 bob) wouldn't be in the output because while col2's '3' is a duplicate, col3's 'bob' is already in the result set (1 3 bob). (I am aware of the `keep=` parameter to change the behaviour of keeping first or last, but ignoring it for simplicity.)

Any thoughts? Thank you.

Answer: 
> 
> prevents the user (developer) from compiling the code.
> 
> 
> 

There's a problem there. You can decide on the user's behaviour, but you can't decide on the compilation of the program. If the code is right (right in the language sense, so it makes sense to the compiler), it will compile, else it won't. You can't make up new arbitrary rules for the compiler.
Before you can even run a program written in C, the compilation needs to be fulfilled.

Functions are called at run-time and so are the parameter values determined at run-time, too.

You can't make the compilation of your code dependent upon the variable `x` in C.