Hi,
When I run the following code;
library(magrittr)
library(ggplot2)
library(plotly)
plotly_speed1 <- datasets::mtcars %>%
as.data.frame() %>%
ggplot(aes(x = wt, y = mpg, color = factor(am)))+
geom_smooth(formula = y ~ x,
method = "lm",
se = FALSE,
color = "#4C787E") +
labs(title = "Speed vs Weight",
y = "Speed (mpg)",
x = "Weight (1000 lbs)")+
theme(plot.title = element_text(hjust = 0.5),
legend.position = c(0.88, 0.875),
legend.background = element_blank())+
geom_point()+
geom_jitter()
# print plot
plotly_speed1
# does not work if wrapped this way
plotly_speed1 %>%
ggplotly(tooltip = all)
I get the error;
Error in match(x, table, nomatch = 0L) :
'match' requires vector arguments
>
Kindly help me figure out what the issue is.