hojsgaard / gRbase

GNU General Public License v2.0
3 stars 2 forks source link

Package Demos do not work, book Ch1 code doesn't either, + more #6

Open knbknb opened 7 years ago

knbknb commented 7 years ago

On my system, the 4 demos for gRbase are all broken

For example, the output of the Demo for the gmData dataset: it produces this error:

demo(package = "gRbase", gmData)

    demo(gmData)
    ---- ~~~~~~

Type  <Return>   to start : 

R> ## ###################################################################
R> ## examples:
R> 
R> ## add new type of variable
R> oldtypes <- validVarTypes()

R> validVarTypes <- function() {
+   c(oldtypes,"MyVarType")
+ }

R> newgmData(1:3,"MyVarType")
Error in FUN(X[[i]], ...) : 
  'arg' should be one of “Discrete”, “Ordinal”, “Continuous”
Calls: demo ... eval -> eval -> newgmData -> sapply -> lapply -> FUN

On page 3 (but also pp 9, 10, 21, 24) of your book, the function call myiplot(ug0i, layout=layout.spring) to the myiplot function does no longer produce a result as displayed in the book, but produces a different layout. Output/Warning:

Spring layout was removed, we use Fruchterman-Reingold instead.

(layout.circle still works. There should be a call to set.seed() first)

I think there have been various API changes to the igraph package since 2012 when your book was released. Springer charges a lot for this textbook, and it might be a disappointment for users who actually purchase it for the full price. You could put a generic warning on your homepage. Or create a new github repository with updated versions of the code used in the book.


The "book errata" link on your homepage does not work. However, there is a link on another page (http://people.math.aau.dk/~sorenh/software/gR/index.html) that does work. it is linking to http://people.math.aau.dk/~sorenh/software/gR/GMwR-errata.txt


The installation notes for the packages should also note that the RBGL package (a dependency of gRbase) is also not on CRAN but on Bioconductor.


My System:

R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

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

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

other attached packages:
 [1] igraph_1.0.1         gRain_1.3-0          gRbase_1.8-3        
 [4] RBGL_1.52.0          Rgraphviz_2.20.0     graph_1.54.0        
 [7] BiocGenerics_0.22.0  BiocInstaller_1.26.0 knitr_1.16          
[10] clipr_0.3.3          tibble_1.3.3         colorout_1.1-2      

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.11    lattice_0.20-35 magrittr_1.5    stats4_3.4.1   
 [5] rlang_0.1.1     Matrix_1.2-10   functional_0.6  tools_3.4.1    
 [9] yaml_2.1.14     compiler_3.4.1
hojsgaard commented 7 years ago

Dear Knut,

Thanks for your suggestions; much is related to that time flies... Will look into them!

My packages depend on packages on bioconductor. Do you have any idea how to make packages also install bioconductor dependencies? In that case, please let me know!

Regarding Springers charges: I recieve 2 USD per sold copy of our book, so I am not becoming a rich man from this activity...

Best Søren


Fra: Knut Behrends [notifications@github.com] Sendt: 2. juli 2017 12:33 Til: hojsgaard/gRbase Cc: Subscribed Emne: [hojsgaard/gRbase] Package Demos do not work, book Ch1 code doesn't either, + more (#6)

On my system, the 4 demos for gRbase are all broken

For example, the output of the Demo for the gmData dataset: it produces this error:

demo(package = "gRbase", gmData)

    demo(gmData)
    ---- ~~~~~~

Type to start :

R> ## ################################################################### R> ## examples: R> R> ## add new type of variable R> oldtypes <- validVarTypes()

R> validVarTypes <- function() {

R> newgmData(1:3,"MyVarType") Error in FUN(X[[i]], ...) : 'arg' should be one of “Discrete”, “Ordinal”, “Continuous” Calls: demo ... eval -> eval -> newgmData -> sapply -> lapply -> FUN


On page 3 (but also pp 9, 10, 21, 24) of your book, the function call myiplot(ug0i, layout=layout.spring) to the myiplot function does no longer produce a result as displayed in the book, but produces a different layout. Output/Warning:

Spring layout was removed, we use Fruchterman-Reingold instead.

(layout.circle still works. There should be a call to set.seed() first)

I think there have been various API changes to the igraph package since 2012 when your book was released. Springer charges a lot for this textbook, and it might be a disappointment for users who actually purchase it for the full price. You could put a generic warning on your homepage. Or create a new github repository with updated versions of the code used in the book.

The "book errata" link on your homepage does not work. However, there is a link on another page (http://people.math.aau.dk/~sorenh/software/gR/index.htmlhttp://people.math.aau.dk/%7Esorenh/software/gR/index.html) that does work. it is linking to http://people.math.aau.dk/~sorenh/software/gR/GMwR-errata.txthttp://people.math.aau.dk/%7Esorenh/software/gR/GMwR-errata.txt


The installation notes for the packages should also note that the RBGL package (a dependency of gRbase) is also not on CRAN but on Bioconductor.


My System:

R version 3.4.1 (2017-06-30) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.2 LTS

Matrix products: default BLAS: /usr/lib/openblas-base/libblas.so.3 LAPACK: /usr/lib/libopenblasp-r0.2.18.so

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

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

other attached packages: [1] igraph_1.0.1 gRain_1.3-0 gRbase_1.8-3 [4] RBGL_1.52.0 Rgraphviz_2.20.0 graph_1.54.0 [7] BiocGenerics_0.22.0 BiocInstaller_1.26.0 knitr_1.16 [10] clipr_0.3.3 tibble_1.3.3 colorout_1.1-2

loaded via a namespace (and not attached): [1] Rcpp_0.12.11 lattice_0.20-35 magrittr_1.5 stats4_3.4.1 [5] rlang_0.1.1 Matrix_1.2-10 functional_0.6 tools_3.4.1 [9] yaml_2.1.14 compiler_3.4.1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/hojsgaard/gRbase/issues/6, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADKgGSqFd_dOR583C6TJp_ulRDiCCeFRks5sJ3IHgaJpZM4OLjGY.

knbknb commented 7 years ago

Maybe I was too quick -- Only the book doesn't say that RBGL is on Bioconductor, but I've just realised that the online documenation (Zurich tutorials etc) indeed seems to mention it.

I don't know a way how to make the installation process for Bioconductor packages transparent to the user. Just now I had to update many of them, maybe due to moving from R 3.4.0 to R 3.4.1, and in order to get it done (as non-root user), I absolutely had to set an Environment variable R_LIBS_USER on the command line. Otherwise the interactive installer wouldn't proceed. No idea how to make this transparent.

Aside from dependency changes, link-rot, and legacy code issues, I found your book the best / most accessible for an intermediate R user like me, making the switch from tutorials based on Matlab/Octave code (Coursera/Stanford MOOCs on Probabilistic Graphical Models) to the much more user-friendly R infrastructure. I've looked into 3-5 books in a library, then checked for updates online.

Needless to say, with Matlab/Octave code I had similar compatibility issues because the Stanford code examples are also a few years old.

I think I'll read chapters of the book in parallel with your bayesnet-2017.pdf That seems to be very polished. Please check for dead links on http://people.math.aau.dk/~sorenh/misc/2016-gmbn-zurich/gmbn-tutorial.html also (Link 3 in "Additional Material").

Best regards, Knut

By the way, do you have to split the 2 USD sales commission into 3 parts, for sharing with your coauthors, or is it 2 USD after the split?

hojsgaard commented 7 years ago

It is 2 USD after the split... S


Fra: Knut Behrends [notifications@github.com] Sendt: 2. juli 2017 13:48 Til: hojsgaard/gRbase Cc: Søren Højsgaard; Comment Emne: Re: [hojsgaard/gRbase] Package Demos do not work, book Ch1 code doesn't either, + more (#6)

Maybe I was too quick -- Only the book doesn't say that RBGL is on Bioconductor, but I've just realised that the online documenation (Zurich tutorials etc) indeed seems to mention it.

I don't know a way how to make the installation process for Bioconductor packages transparent to the user. Just now I had to update many of them, maybe due to moving from R 3.4.0 to R 3.4.1, and in order to get it done (as non-root user), I absolutely had to set an Environment variable R_LIBS_USER on the command line. Otherwise the interactive installer wouldn't proceed. No idea how to make this transparent.

Aside from dependency changes, link-rot, and legacy code issues, I found your book the best / most accessible for an intermediate R user like me, making the switch from tutorials based on Matlab/Octave code (Coursera/Stanford MOOCs on Probabilistic Graphical Models) to the much more user-friendly R infrastructure. I've looked into 3-5 books in a library, then checked for updates online.

Needless to say, with Matlab/Octave code I had similar compatibility issues because the Stanford code examples are also a few years old.

I think I'll read chapters of the book in parallel with your bayesnet-2017.pdfhttp://people.math.aau.dk/%7Esorenh/misc/2016-gmbn-zurich/doc/bayesnet-2017.pdf That seems to be very polished. Please check for dead links on http://people.math.aau.dk/~sorenh/misc/2016-gmbn-zurich/gmbn-tutorial.htmlhttp://people.math.aau.dk/%7Esorenh/misc/2016-gmbn-zurich/gmbn-tutorial.html also (Link 3 in "Additional Material").

Best regards, Knut

By the way, do you have to split the 2 USD sales commission into 3 parts, for sharing with your coauthors, or is it 2 USD after the split?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/hojsgaard/gRbase/issues/6#issuecomment-312487071, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADKgGZax3_yx3GtDsaWTkoVsoP4QzhqOks5sJ4OPgaJpZM4OLjGY.