Bayesian Network with R

前端 未结 2 1746
闹比i
闹比i 2021-02-14 03:13

I am trying to build a Bayesian network model. However I am unable to install a suitable package. Tried gRain, bnlearn and Rgraphviz for p

相关标签:
2条回答
  • 2021-02-14 03:38

    For R version 3.5 or greater, you can install Bioconductor packages using BiocManager.
    Please see: https://bioconductor.org/install.
    I installed them using the following code:

    if (!requireNamespace("BiocManager", quietly = TRUE))
        install.packages("BiocManager")
    BiocManager::install(version = "3.10")
    BiocManager::install(c("gRbase", "RBGL", "Rgraphviz", "gRain"))
    
    0 讨论(0)
  • 2021-02-14 04:01

    The packagesgraph, RBGL and Rgraphviz are not on CRAN but on bioconductor.

    To install these packages, execute

    if (!requireNamespace("BiocManager", quietly = TRUE))
        install.packages("BiocManager")
    BiocManager::install(c("graph", "RBGL", "Rgraphviz"))
    

    Then install the packages from CRAN in the usual way:

    install.packages("gRain", dependencies=TRUE)
    

    See also the gRain installation instructions.

    0 讨论(0)
提交回复
热议问题