BiDAG is dependent on the package "graph", which is no longer available on CRAN. You can download BiocManager (if needed) then the "graph" package using the below syntax. (Note that I am using R version 4.1.3, which uses BiocManager version 3.14. You may need to use a different version of BiocManager if using an older version of R. If you try to use an incorrect version, you should receive an error message that tells you the version to use.)

if (!requireNamespace("BiocManager", quietly = TRUE))

install.packages("BiocManager")

BiocManager::install("graph", version = "3.14")