I am trying to use the census_api_key() function in tidycensus, but keep getting an error that it can't be found, nor does it seem like the tidycensus library is being installed properly according to the error messages I am receiving.
Here is what I've done so far:
> install.packages("tidycensus")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/matia/OneDrive/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidycensus_0.11.4.zip'
Content type 'application/zip' length 2683556 bytes (2.6 MB)
downloaded 2.6 MB
> library(tidycensus)
Error: package or namespace load failed for ‘tidycensus’:
object ‘is_present’ is not exported by 'namespace:lifecycle'
In addition: Warning message:
package ‘tidycensus’ was built under R version 3.6.3
> census_api_key("my key")
Error in census_api_key("my key") :
could not find function "census_api_key"
I've also tried installing the rgdal library, as was suggested for other tidycensus errors, but this hasn't worked for me.
Any suggestions are greatly appreciated.
question from:
https://stackoverflow.com/questions/65864931/error-downloading-tidycensus-library-in-r 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…