leaflet not works in notebook(R language)

yalei
New Contributor

I saw this notebook: htmlwidgets-azure - Databricks (microsoft.com)

However, it is not reproducible. I got a lot errors:

  1. there is no package called ‘R.utils’. This is easy to fix, just install the package "R.utils"
  2. "can not be unloaded". This is not a way one, I tried to remove htmltools and install again. somehow, it is fixed
Error in value[[3L]](cond) : 
  Package ‘htmltools’ version 0.5.3 cannot be unloaded:
 Error in unloadNamespace(package) : namespace ‘htmltools’ is imported by ‘htmlwidgets’, ‘shiny’ so cannot be unloaded
 
Error in value[[3L]](cond): Package ‘htmltools’ version 0.5.3 cannot be unloaded:
  1. After fixing all the package errors, the plotly package finally works. However, leaflet and dygraphs print nothing in the notebook. I downloaded the generated html files in /dbfs/FileStore/rwidgets and tested them locally, the map works. It just does not show up in the notebook.

Here is my testing environment:

runtime: 11.3 LTS (includes Apache Spark 3.3.0, Scala 2.12)

note: standard_F4

KAdamatzky
New Contributor III

Hi yalei, 

 

Did you have any luck fixing this issue? I am also trying to replicate the htmlwidgets notebook and am running into the same error.

Unfortunately, the suggestions provided by Kaniz_Fatma below did not work.