DominikRafacz / deepdep

Visualise and Explore Deep Dependencies of R packages
https://dominikrafacz.github.io/deepdep/
GNU General Public License v3.0
73 stars 8 forks source link

in shiny app, clicking on a package name fails #52

Open ejanalysis opened 6 months ago

ejanalysis commented 6 months ago

Bug In the shiny app, clicking on a package name fails to get and use the actual package name.

Steps to reproduce the behavior

  1. use version 4.3 from CRAN (can't find that version on your github repo, so could not do a pull request to fix this)
  2. deepdep_shiny()
  3. type a package name in Package to visualize: (such as leaflet)
  4. click on a package name box in the graph

Expected behavior Should create a new graph with that selected new package name that was clicked on.

Solution suggested In server.R, fix one line by using as.character()

# fixed line:
    new_package <- as.character(adjacency_df[which.min(adjacency_df[["dist_"]]), "name"])
# old line:
    # new_package <-            adjacency_df[which.min(adjacency_df[["dist_"]]), "name"]