I am trying to use Plotly in Google Colab running on R Environment. But it is not displaying

If you open the link, it seems pretty straightforward to define a bar graph and show it

However, when I do the same thing in my Colab, it is not showing anything.

Please help me.

Note: I tried hours with ChatGPT and advanced GPT’s within it, but to no avail. I tried using orca library, but it says it is deprecated. I tried using htmlwidget with iframe, but they too don’t work. However, on seeing the Files section after using htmlwidgets with iframe, I found these new folders (temp_plot.html file and temp_plot_files folder)

image

But somehow it is not rendering.