package "estimatr" install error

i just install the estimatr 0.26.0, but it shown like this.

library(estimatr)
Error: package or namespace load failed for ‘estimatr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘Formula’

Try installing the missing package dependency

install.packages("Formula")

r
thank you, i've install the Formula successcfully, but when i run the estimatr, it shown like:

library(estimatr)
Error: package or namespace load failed for ‘estimatr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘Rcpp’
In addition: Warning message:
package ‘estimatr’ was built under R version 4.1.0

Same problem, different package. You just have to keep doing this till you get no error messages.

install.packages("Rcpp")

Thank you soo much, but it shown like this:

install.packages("Rcpp")
Installing package into ‘C:/Users/Lenovo/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)

so, i've tried to use
install.packages("Rcpp", lib="/Users/Lenovo/Documents/R/win-library/4.0")

i dno't know am i wrong about the code, but it just shows the exactly the same in the output:

install.packages("Rcpp", lib="/Users/Lenovo/Documents/R/win-library/4.0")

thanks for your time

Can you show the complete message you get when you try to install? So far you are not showing any error message, just normal installation messages.

Sure, here it is

library(estimatr)
Error: package or namespace load failed for ‘estimatr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘Rcpp’

install.packages("Rcpp")
Installing package into ‘C:/Users/Lenovo/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)

thank you for your patience

Are you sure that is the whole message you get when you install Rcpp?, I ask because what you are posting doesn't show any problem.

Try restarting your R session Ctrl+Shift+F10 and then try to load Rcpp and estimatr. Do you get any different error message?

library(Rcpp)
library(estimatr)

This is the new one that after i restart the Rsession:

Restarting R session...

library(Rcpp)
Error in library(Rcpp) : there is no package called ‘Rcpp’
library(estimatr)
Error: package or namespace load failed for ‘estimatr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘Rcpp’
In addition: Warning message:
package ‘estimatr’ was built under R version 4.1.0

and this is when i tired to install Rcpp:

i've just download the .tar compressed file from the https://cran.rstudio.com/, and install from package Archieve file. and installed "Rcpp", "generics", and "rlang". Finally, the "estimatr" has installed successfully.

Thank you so much!

Just for completenes, the previous error seemed to be a connectivity issue, R is not being able to connect to the CRAN repository you have selected, these are some things to try.

  • Choose a different CRAN repository, RStudios repository is a good choice (http://cran.rstudio.com/) or you could choose one that is geographically closer to you.
  • Disable secure download setting.
  • Check if your internet connection has traffic restrictions of some kind, like a firewall, proxy server, etc. This is usually the case when you are at work or school.
1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.