This should be easy, but I couldn't find any way to do this. All I want to do is find the rows with non-fraction values in y
. I have data like so:
> df <- data.frame(id = c("a", "a", "a", "a", "a", "b", "b", "b", "b"),
y = c(1.000, 2.000, 3.000, 4.000, 5.345, 1.000, 2.000, 3.000, 4.670))
> df
id y
a 1.000
a 2.000
a 3.000
a 4.000
a 5.345
b 1.000
b 2.000
b 3.000
b 4.670
Output required:
id y
a 5.345
b 4.670
A tidyverse
method would be preferred. Thanks!