Hi again,
Just for completeness, I'll show you the extension of my approach for your new request as well
library(dplyr)
#Get the data
myData = data.frame(
fruitNumber = 1:8,
fruit = c("Apple", "Banana", "Orange", "Peach", "Guava",
"Banana", "Orange", "Peach"),
length = c(2,4,2,3,4,4,2,3),
colorComplexion= c(0.34,0.23,0.68,0.11,0.47,0.25, 0.42,0.13),
side = c("Top","Top","Top","Top","Top","Bottom","Bottom", "Top")
)
#Compare and filter
myData = myData %>% group_by(fruit, length) %>%
mutate(
similarity = min(colorComplexion) / max(colorComplexion),
nSides = n_distinct(side),
n = n()) %>%
ungroup() %>%
filter(similarity < 0.75 | n == 1 | nSides == 1)
myData
#> # A tibble: 6 x 8
#> fruitNumber fruit length colorComplexion side similarity nSides n
#> <int> <chr> <dbl> <dbl> <chr> <dbl> <int> <int>
#> 1 1 Apple 2 0.34 Top 1 1 1
#> 2 3 Orange 2 0.68 Top 0.618 2 2
#> 3 4 Peach 3 0.11 Top 0.846 1 2
#> 4 5 Guava 4 0.47 Top 1 1 1
#> 5 7 Orange 2 0.42 Bottom 0.618 2 2
#> 6 8 Peach 3 0.13 Top 0.846 1 2
Created on 2021-07-15 by the reprex package (v2.0.0)
I added the side category and also added a new Peach to with the same side as the previous one. So in the results, the Banana is filtered out because it satisfies all removal criteria, the Orange is kept because its similarity < 0.75% and the Peach is kept because both have the same side.
You can keep adding criteria once you get the hang of the way dplyr grouping and filtering works 
Hope this helps,
PJ