Uninstall tidyTools

tinyTools has been renamed as tinytools. So please uninstall it before you install laggedcor. And don’t use it any more.

  1. detach it by:
detach("package:tinyTools")
  1. Remove it by:
remove.packages(pkgs = "tinyTools")
  1. Restart your R session.

If there are errors, ignore them.

Install laggedcor from github

You can just use the devtools or remote to install laggedcor.

Please update devtools first and then restart your r session.

install.packages("devtools")

Then install laggedcor:

devtools::install_github("jaspershen/laggedcor", dependencies = TRUE)

In the installation, it will ask if you want to update some packages, just press Enter key to skip it.

If there is a error like below:

Error: Failed to install 'laggedcor' from GitHub: HTTP error 403. API rate limit exceeded for 171.66.10.237. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

Try to resolve it by:

  1. In you R console, type this code:

It will open a page in browser, and create a “New personal access token” and copy it.

  1. Then type this code:
usethis::edit_r_environ()

and then add one line like below:

GITHUB_PAT=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

The GITHUB_PAT should be yours that is created in step 1.

And then restart R session and try again.

Session information

sessionInfo()
#> R version 4.3.0 (2023-04-21)
#> Platform: x86_64-apple-darwin20 (64-bit)
#> Running under: macOS Ventura 13.5.1
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.0.dylib 
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0
#> 
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> 
#> time zone: America/Los_Angeles
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] vctrs_0.6.2       cli_3.6.1         knitr_1.43        rlang_1.1.1      
#>  [5] xfun_0.39         stringi_1.7.12    purrr_1.0.1       textshaping_0.3.6
#>  [9] jsonlite_1.8.5    glue_1.6.2        rprojroot_2.0.3   htmltools_0.5.5  
#> [13] ragg_1.2.5        sass_0.4.6        rmarkdown_2.22    evaluate_0.21    
#> [17] jquerylib_0.1.4   fastmap_1.1.1     yaml_2.3.7        lifecycle_1.0.3  
#> [21] memoise_2.0.1     stringr_1.5.0     compiler_4.3.0    fs_1.6.2         
#> [25] rstudioapi_0.14   systemfonts_1.0.4 digest_0.6.31     R6_2.5.1         
#> [29] magrittr_2.0.3    bslib_0.5.0       tools_4.3.0       pkgdown_2.0.7    
#> [33] cachem_1.0.8      desc_1.4.2