If you aren't performing any sort of transformation, why would you want different limits on the secondary axis? What would this even look like?
I think you are better off achieving this level of customization on the secondary axis via a transformation and then using breaks and labels to control the aesthetics. Something like:
library(magrittr)
library(ggplot2)
mtcars %>%
ggplot(aes(hp, mpg)) +
geom_point() +
scale_y_continuous(
sec.axis = sec_axis(
trans = ~ 235.21 / .x,
name = "Litres per 100km",
breaks = seq(0, 30, by = 2)
)
) +
labs(x = "Horse Power (HP)", y = "Miles per gallon (MPG)") +
theme_minimal(14)