Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animation function lookup doesn't work when ndtv not loaded #23

Open
skyebend opened this issue Aug 23, 2016 · 4 comments
Open

animation function lookup doesn't work when ndtv not loaded #23

skyebend opened this issue Aug 23, 2016 · 4 comments

Comments

@skyebend
Copy link
Contributor

User Deisy Gysi reports when the package is namespace attached but not loaded, compute.animation isn't able to locate the the internal network.layout.animate.* functions

@OJWatson
Copy link

This would be great to fix so that packages dependent on this could be CRAN ready. Current solution/hack I have used on my fork is to create a new argument for compute.animation that allows the layout.fun to be specified explicitly overriding the function match:

 if(!is.null(force.layout)){
  layout.fun <- force.layout
  } else {
  layout.fun <- try(match.fun(paste("network.layout.animate.", animation.mode, sep = "")), silent = TRUE)
  if (class(layout.fun) == "try-error"){
      stop(paste("Error in compute.animation: no network animation layout function for animation.mode ", animation.mode))
  }
  }

@skyebend
Copy link
Contributor Author

fixing this will require a bit of refactoring in how ndtv looks up and locates user-added layout functions. As a work around, have you tried just adding Depends ndtv in the namespace to force ndtv to be loaded?

@OJWatson
Copy link

I have just tried depends and it builds and passes CRAN.

@JuKo007
Copy link

JuKo007 commented Nov 16, 2021

I am having a similar issue. ndtv is already listed as "Depends" in my DESCRIPTION file but I still get the error:
Error in compute.animation(dynamicWA, animation.mode = "kamadakawai", : Error in compute.animation: no network animation layout function for animation.mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants