I am trying to provide a variable with the column name to create a plotly
graph, similar to ggplot2::aes_string
. Somehow I am stuck...
plot_ly(iris, x=~Sepal.Length, y=~Sepal.Width) # works as expected
plot_ly(iris, x=~'Sepal.Length', y=~'Sepal.Width') # fails since it doesn't use the column
I guess this is a pretty easy question, but I just miss the vocabulary to find a solution on stack overflow.