nutterb/HydeNet

htmlwidgets dependency

Closed this issue · 6 comments

R is barking at me because it wants htmlwidgets.

It seems this package needs to be installed from GitHub, which is a barrier for the common user. Do we really need it?

> devtools::install_github("nutterb/HydeNet", ref="development")
Downloading github repo nutterb/HydeNet@development
Installing HydeNet
"C:/PROGRA~1/R/R-31~1.3/bin/x64/R" --vanilla CMD INSTALL  \
  "C:/Users/daltonj/AppData/Local/Temp/Rtmp0GtC7C/devtoolse5015101222/nutterb-HydeNet-9269616" --library="C:/Program  \
  Files/R/R-3.1.3/library" --install-tests 

* installing *source* package 'HydeNet' ...
** R
** data
*** moving datasets to lazyload DB
Warning: namespace 'HydeNet' is not available and has been replaced
by .GlobalEnv when processing object 'BlackJack'
Warning: namespace 'HydeNet' is not available and has been replaced
by .GlobalEnv when processing object 'BlackJack'
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'htmlwidgets'
ERROR: lazy loading failed for package 'HydeNet'
* removing 'C:/Program Files/R/R-3.1.3/library/HydeNet'
* restoring previous 'C:/Program Files/R/R-3.1.3/library/HydeNet'
Error: Command failed (1)

I think we may want to look at the script we give people in 'Getting Started..' so that it works from fresh R install.

Or at least a script that checks/updates/installs all the Bioconductor packages.

This is something I've been struggling with on the Github repository. When you install a package from CRAN, it will load all of the dependencies from Bioconductr. There's a way to get R to look in Bioconductr if you'repeated installing from Github. I should add that to the Github README

I'm not sure why htmlwidgets didn't load for you. It is a CRAN package. But then, I'm not sure if install_github loads dependencies. I'll have to check the documentation and adjust the script accordingly.

I'm almost able to get HydeNet to load on a clean install. When I do have problems, it seems to be with RBGL, so I have to explicitly install that package for some reason. Unfortunately, to remove our dependency on RBGL requires removing our dependency on gRbase, which is the package that builds the dag from which we pull the node names and parents. And gRbase is the only package I can find that offers that formula syntax. So if we abandon gRbase, we have to reenvision how me define the models. I have to admit, I'm not crazy about that idea.

I did move gRbase from the Depends: to the Imports: field. This means that the gRbase isn't loaded when HydeNet is loaded. That seems to help a little.

And I assume you won't be crazy about the idea of building a mirror package within Python (just kidding - the idea, though, came out of the fact that Python has an integrated MCMC sampler built right into the platform so no translating formulas and syntax across packages.

Actually, I'm not completely opposed to it. But I wouldn't want to tackle that on the time frame we're discussing for this package :)