I am trying to plot `line graph` over the `bar plot` with `double-y-axis` using `ggplot2`.

Below is the example data and code for bar chart:

```
library(ggplot2)
data <- data.frame("groups" = c('AA','BB','CC', 'AA','BB','CC', 'AA','BB','CC'), 
                   "something" = c('aaaaaa', 'bbbbb', 'cccccc', 'dddddddd', 'eeeeeee', 'ffffffff', 'gggggggggg', 'hhhhhhhhh', 'iiiiiiiii'),
               "value1" = c(1.1, 2.4, 3.5, 5, 4.1, 3, 2.5, 1.4, 4.5),
               "value2" = c(2, 25, 10, 4, 15, 5, 3, 4, 8))
p1 <- ggplot(data, aes(x = something,
                   y = value1,
                   fill = groups)) + geom_bar(stat = "identity",  position = "dodge") + 
  xlab("something") + ylab("groups") + labs(fill = "groups") +
  theme_bw() + theme(aspect.ratio = 2/1,
                 axis.title.x = element_text(face="bold"),
                 axis.title.y = element_text(face="bold"),
                 axis.text.x = element_text(angle = 90, vjust = 0.2, hjust=1)) + coord_equal(1/0.2)

```

I am trying to add the `line` to the above `bar chart`. However, the `scale` on both sides of `y-axis` show same.

```
p1 + geom_line(aes(x = something, y = value2), size = 1, color="red", group = 1) +
  scale_y_continuous(sec.axis = sec_axis(~., name = "Count")) +
  geom_point(aes(x = something, y = value2), size = 1, color="blue", group = 1) +
   theme(axis.line.y.right = element_line(color = "red"),
    axis.ticks.y.right = element_line(color = "red"),
    axis.text.y.right = element_text(color = "red"),
    axis.title.y.right = element_text(color = "red"))

```

When I tried to manipulate `y` value as shown in [biostats](https://biostats.w.uib.no/overlaying-a-line-plot-and-a-column-plot/). However, I am still not getting the correct `line`, `bars` and `values`.

```
p1 + geom_line(aes(x = something, y = 0.1*value2), size = 1, color="red", group = 1) +
   scale_y_continuous(sec.axis = sec_axis(~./0.1, name = "Count")) +
   geom_point(aes(x = something, y = 0.1*value2), size = 1, color="blue", group = 1) +
   theme(axis.line.y.right = element_line(color = "red"),
    axis.ticks.y.right = element_line(color = "red"),
    axis.text.y.right = element_text(color = "red"),
    axis.title.y.right = element_text(color = "red"))

```

I would like to have correct `line` and `bar` plots for each of the corresponding `axis`.