Run the below code and see if it runs:
cran <- getOption("repos")
cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/"
options(repos = cran)
install.packages("mxnet")
Once, you install the "mxnet" package from cran repository, run the below command:
library(devtools)
install_version("DiagrammeR", version = "0.9.2", repos = "http://cran.us.r-project.org")
library(DiagrammeR)
library(mxnet)
You would have to load "DiagrammeR" package, before you load the "mxnet" package.
Hoping that this would help you in loading the "mxnet" package.