I have been trying to install mled on R 4.3.3 in order to run energy requirement analyses in Zambia but I keep running into installation errors such as:
- Package Installation Fails (Permission Issue)
When running source("backend.R"), the script attempts to install packages (pacman, Rcpp) to the system-level library:
Warning: 'lib = "C:/Program Files/R/R-4.3.3/library"' is not writable
Error in install.packages("pacman") : unable to install packages
Even after setting .libPaths() to a user-writable location, backend.R still attempts to install to the system library.
-
Rcpp Download Fails
When loading backend.R, I receive the following warning:
Warning: unable to access index for repository https://rcppcore.github.io/drat/bin/windows/contrib/4.3:
cannot open URL ...
This prevents Rcpp from being installed.
-
find_it() Function Missing
When running calculate_rates_for_baseline.R, the following error occurs:
Error in find_it("sdg-7.1.1-access_to_electricity.xlsx") :
could not find function "find_it"
I searched for this function in the M-LED codebase but didn’t find a definition. It appears to be custom, but it's not sourced by default.
-Steps Already Taken
Set .libPaths("C:/Users/presentation/Documents/R/win-library/4.3")
Installed pacman, readxl, and Rcpp manually to personal library
Used lib.loc to load packages
Attempted to source possible helper files (functions.R, utils.R)
Requesting for help as I fear introducing changes to code that would change intention of how the platform is meant to behave.
I have been trying to install mled on R 4.3.3 in order to run energy requirement analyses in Zambia but I keep running into installation errors such as:
When running source("backend.R"), the script attempts to install packages (pacman, Rcpp) to the system-level library:
Warning: 'lib = "C:/Program Files/R/R-4.3.3/library"' is not writable
Error in install.packages("pacman") : unable to install packages
Even after setting .libPaths() to a user-writable location, backend.R still attempts to install to the system library.
Rcpp Download Fails
When loading backend.R, I receive the following warning:
Warning: unable to access index for repository https://rcppcore.github.io/drat/bin/windows/contrib/4.3:
cannot open URL ...
This prevents Rcpp from being installed.
find_it() Function Missing
When running calculate_rates_for_baseline.R, the following error occurs:
Error in find_it("sdg-7.1.1-access_to_electricity.xlsx") :
could not find function "find_it"
I searched for this function in the M-LED codebase but didn’t find a definition. It appears to be custom, but it's not sourced by default.
-Steps Already Taken
Set .libPaths("C:/Users/presentation/Documents/R/win-library/4.3")
Installed pacman, readxl, and Rcpp manually to personal library
Used lib.loc to load packages
Attempted to source possible helper files (functions.R, utils.R)