I have got this error twice recently - no idea why, but in the last instance it was solved by changing tibble to data.frame, that is:
starwars <- data.frame(starwars) #this made the below command work instead of showing the error message
OptimalCutpoints::optimal.cutpoints("height", "gender", methods = c("Youden", "ROC01"), tag.healthy = "masculine", data=starwars)
Any idea what is not working?