R Under development (unstable) (2026-04-26 r89963 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("repo.data") Attaching package: 'repo.data' The following object is masked from 'package:stats': alias > pkges <- c("BaseSet", "experDesign") > ca_columns <- c("Package", "Datetime", "Version", "User", "Size", "Status") > # Test that it works > st <- system.time(ca <- cran_archive(pkges)) > repo.data:::no_internet(ca) > stopifnot(colnames(ca) == ca_columns) > st1 <- system.time(ca2 <- cran_archive(pkges)) > stopifnot("Cache didn't worked" = st1[[3]] < st[[3]]) > stopifnot("Cache was not the same" = all.equal(ca, ca2)) > > clean_cache() > st2 <- system.time(ca3 <- cran_archive(pkges)) > repo.data:::no_internet(ca3) > stopifnot("Clean cache restores initial" = st2[[3]] > st1[[3]]) > stopifnot("Still same result" = all.equal(ca, ca3)) > > st4 <- system.time(ca <- cran_archive()) Warning: There are 3 packages both archived and published This indicate manual CRAN intervention. > repo.data:::no_internet(ca) > stopifnot(colnames(ca) == ca_columns) > st5 <- system.time(ca2 <- cran_archive()) Warning: There are 3 packages both archived and published This indicate manual CRAN intervention. > stopifnot("Cache returns the same for all packages" = all.equal(ca, ca2)) > stopifnot("Clean cache restores initial" = st5[[3]] < st4[[3]]) > > rtweet <- cran_archive("rtweet") > stopifnot(NROW(rtweet) == 15L) > > proc.time() user system elapsed 57.53 6.60 64.62