Why do we need to use AsIs operator (i.e. I(x)) while defining symbols, colors and sizes in plotly graphs? The explanation in the official documentation is rather sketchy and obscure.
Let's say, I want to get standard point characters. In the Base plotting system I would type something like this:
plot(x = 1:25, y = 1:25, pch = 1:25)
A similar command in plotly gives only 6 characters instead of 25:
plot_ly(x = 1:25, y = 1:25, symbol = 1:25)
To reproduce Base plotting system, one needs to pass the vector 1:25 to AsIs operator:
plot_ly(x = 1:25, y = 1:25, symbol = I(1:25))
So, why couldn't we simply pass 1:25 to plot_ly, like we did that in plot?