That is a shame i am no expert on r2d3. However i believe i have found a work around. I have removed the inputSlider in the UI and added a frame = Year into the server piece. This acts in the same way as the slide but gives me the functionality i need.
output$plot <- renderPlotly({
print(
ggplotly(ggplot( if(input$Division == "All") {df}
else
{outVar()},
aes(x = Profit, y = Vol, size = Amount, color = Class, **frame = Year**)) +
geom_point(alpha = 0.2) + scale_size(range = c(5,40)) +
geom_text(aes(label = Class), size = 5)+
geom_vline(xintercept = 0, linetype="dotted", color = "black", size=0.75)+
scale_y_continuous(labels = scales::percent,expand = c(0, 0), limits = c(y_low,y_high)) +
scale_x_continuous(labels = scales::percent,expand = c(0, 0), limits = c(x_low,x_high)) +
labs(
title = "Profitability vs Volatility",
x = "Profitability %",
y = "Volatility %") +
theme_bw() +
theme(legend.position = "none") +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.background = element_blank(), axis.line = element_line(colour = "black")) +
theme(panel.spacing = unit(2, "lines")))
)
})