Thank you very much for the response.
Here is the code and error. I am on windows 11, and I ran the code as the administrator.
> devtools::install_github("CCS-Lab/hBayesDM", subdir="R",force=T)
Downloading GitHub repo CCS-Lab/hBayesDM@HEAD
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
checking for file 'C:\Users\HUAWEI\AppData\Local\Temp\RtmpmCXaEI\remotes5bf87ec56b7a\CCS-Lab-hBayesDM-6a52ceb\R/DESCRIPTION' ...
✔ checking for file 'C:\Users\HUAWEI\AppData\Local\Temp\RtmpmCXaEI\remotes5bf87ec56b7a\CCS-Lab-hBayesDM-6a52ceb\R/DESCRIPTION' (579ms)
Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
problem copying .\R\inst\extdata to C:\Users\HUAWEI\AppData\Local\Temp\RtmpqMtSzm\Rbuild588043a21a61\R\inst\extdata: Permission denied
Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
problem copying .\R\inst\stan_files to C:\Users\HUAWEI\AppData\Local\Temp\RtmpqMtSzm\Rbuild588043a21a61\R\inst\stan_files: Permission denied
ERROR
copying to build directory failed
Error: Failed to install 'hBayesDM' from GitHub:
! System command 'Rcmd.exe' failed
What permission do I need? The package installation from CRAN did not have this permission problem.