dynverse / dyneval

Metrics to compare two or more trajectories ⚖
2 stars 2 forks source link

there is no package called ‘netdist’ #52

Closed pablommesas closed 5 years ago

pablommesas commented 5 years ago

First of all, let me congratulate you on the great work!

I ran into this issue when following https://dynverse.org/developers/evaluating-ti-method/ section and evaluating the 'him' metric.

metrics <- map_dfr(models$model, dyneval::calculate_metrics, dataset = dataset, metrics = metric_ids)

I have installed the 'nettools' package from https://github.com/filosi/nettools and loaded it successfully, I can even see the netdist() function.

The error still persists, I have traced it back to the metric_him.R, I'm guessing to line 24:

 requireNamespace("netdist")

Does this have something to do with my installation/NAMESPACE configuration? or should that line be something like requireNamespace("nettools")?

Sorry if that is an obvious one! Thanks. I attach my sessionInfo :)

R version 3.5.2 (2018-12-20)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Scientific Linux 7.5 (Nitrogen)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.4.0    stringr_1.4.0    dplyr_0.8.0.1    purrr_0.3.2      readr_1.3.1      tidyr_0.8.3      tibble_2.1.1     ggplot2_3.1.0    tidyverse_1.2.1  dynmethods_1.0.0 dynwrap_1.0.0   
[12] dyneval_0.2.2    dyntoy_0.9.9    

loaded via a namespace (and not attached):
 [1] nlme_3.1-137          fs_1.2.7              usethis_1.4.0         dynutils_1.0.2        bit64_0.9-7           lubridate_1.7.4       devtools_2.0.1        RColorBrewer_1.1-2   
 [9] httr_1.4.0            rprojroot_1.3-2       tools_3.5.2           backports_1.1.3       R6_2.4.0              rpart_4.1-13          Hmisc_4.2-0           lazyeval_0.2.2       
[17] colorspace_1.4-1      nnet_7.3-12           withr_2.1.2           tidyselect_0.2.5      carrier_0.1.0         gridExtra_2.3         prettyunits_1.0.2     processx_3.3.0       
[25] bit_1.1-14            compiler_3.5.2        rvest_0.3.2           cli_1.1.0             htmlTable_1.13.1      hdf5r_1.1.1           xml2_1.2.0            desc_1.2.0           
[33] labeling_0.3          scales_1.0.0          checkmate_1.9.1       mvtnorm_1.0-10        callr_3.2.0           digest_0.6.18         foreign_0.8-71        base64enc_0.1-3      
[41] pkgconfig_2.0.2       htmltools_0.3.6       sessioninfo_1.1.1     htmlwidgets_1.3       rlang_0.3.3           readxl_1.3.1          pdist_1.2             rstudioapi_0.10      
[49] generics_0.0.2        jsonlite_1.6          acepack_1.4.1         magrittr_1.5          Formula_1.2-3         Matrix_1.2-15         Rcpp_1.0.1            munsell_0.5.0        
[57] stringi_1.4.3         yaml_2.2.0            pkgbuild_1.0.3        plyr_1.8.4            grid_3.5.2            crayon_1.3.4          lattice_0.20-38       haven_2.1.0          
[65] splines_3.5.2         hms_0.4.2             dynfeature_1.0.0      knitr_1.22            ps_1.3.0              pillar_1.3.1          igraph_1.2.4          ranger_0.11.2        
[73] babelwhale_0.0.0.9000 reshape2_1.4.3        pkgload_1.0.2         glue_1.3.1            latticeExtra_0.6-28   data.table_1.12.0     remotes_2.0.2         modelr_0.1.4         
[81] dynparam_1.0.0        cellranger_1.1.0      testthat_2.0.1        gtable_0.3.0          assertthat_0.2.1      xfun_0.6              broom_0.5.1           survival_2.43-3      
[89] memoise_1.1.0         cluster_2.0.7-1 
zouter commented 5 years ago

Hi!

The nettools package is as far as we know not maintained anymore, so we created our own fork with only those functions that we need retained: dynverse/netdist . This package is inside the Suggests of the dyneval package, so installing it using

devtools::install_github("dynverse/dyneval", dependencies = TRUE)

should do the trick :slightly_smiling_face:

pablommesas commented 5 years ago

Thanks. That solved the issue :)

zouter commented 5 years ago

Great!