style: apply air and prettier formatting repo-wide
This commit is contained in:
parent
cf851c1c30
commit
251bba8f23
1 changed files with 555 additions and 259 deletions
|
|
@ -2,42 +2,58 @@ library(future)
|
|||
future::plan(multisession)
|
||||
future::plan(sequential)
|
||||
time = Sys.time()
|
||||
files <- s3fs::s3_dir_ls(sprintf("devxy-r-package-binaries-hel1/arm64/rhel9/latest/src/contrib/Archive"), recurse = T)
|
||||
files <- s3fs::s3_dir_ls(
|
||||
sprintf(
|
||||
"devxy-r-package-binaries-hel1/arm64/rhel9/latest/src/contrib/Archive"
|
||||
),
|
||||
recurse = T
|
||||
)
|
||||
Sys.time() - time
|
||||
|
||||
|
||||
|
||||
archive <- llply(dirs, function(dir) {
|
||||
files <- list.files(dir, recursive = FALSE, full.names = TRUE, pattern = "*.tar.gz")
|
||||
files <- list.files(
|
||||
dir,
|
||||
recursive = FALSE,
|
||||
full.names = TRUE,
|
||||
pattern = "*.tar.gz"
|
||||
)
|
||||
if (length(files) == 0) {
|
||||
print(paste0("Error: Empty directory: ", dir))
|
||||
return(NULL)
|
||||
}
|
||||
info <- file.info(files)
|
||||
|
||||
tryCatch({
|
||||
rownames(info) <- paste0(basename(dirname(files)), "/", basename(files))
|
||||
}, error = function(e) {
|
||||
print(paste0("Error: Exception catched for Archived directory: ", dir))
|
||||
print(e)
|
||||
return(NULL)
|
||||
})
|
||||
tryCatch(
|
||||
{
|
||||
rownames(info) <- paste0(basename(dirname(files)), "/", basename(files))
|
||||
},
|
||||
error = function(e) {
|
||||
print(paste0("Error: Exception catched for Archived directory: ", dir))
|
||||
print(e)
|
||||
return(NULL)
|
||||
}
|
||||
)
|
||||
|
||||
info
|
||||
})
|
||||
|
||||
tryCatch({
|
||||
rownames(info) <- paste0(basename(dirname(files)), "/", basename(files))
|
||||
}, error = function(e) {
|
||||
print(paste0("Error: Exception catched for Archived directory: ", dir))
|
||||
print(e)
|
||||
return(NULL)
|
||||
})
|
||||
tryCatch(
|
||||
{
|
||||
rownames(info) <- paste0(basename(dirname(files)), "/", basename(files))
|
||||
},
|
||||
error = function(e) {
|
||||
print(paste0("Error: Exception catched for Archived directory: ", dir))
|
||||
print(e)
|
||||
return(NULL)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
curl::curl_download("https://cran.devxy.io/amd64/rhel9/latest/src/contrib/PACKAGES.db", "PACKAGES.db")
|
||||
curl::curl_download(
|
||||
"https://cran.devxy.io/amd64/rhel9/latest/src/contrib/PACKAGES.db",
|
||||
"PACKAGES.db"
|
||||
)
|
||||
con = DBI::dbConnect(RSQLite::SQLite(), "PACKAGES.db")
|
||||
df = DBI::dbReadTable(con, "packages")
|
||||
|
||||
|
|
@ -50,6 +66,14 @@ which(grepl("digest", df$Package))
|
|||
system("cat /tmp/PACKAGES | grep '^Package: digest' | wc -l")
|
||||
|
||||
|
||||
curl::curl_fetch_memory("https://cloud.r-project.org/src/contrib/Meta/archive.rds")
|
||||
remotes = readRDS(url("https://cloud.r-project.org/src/contrib/Meta/archive.rds", "rb"))
|
||||
packages = readRDS(url("https://cran.devxy.io/arm64/noble/latest/src/contrib/PACKAGES.rds", "rb"))
|
||||
curl::curl_fetch_memory(
|
||||
"https://cloud.r-project.org/src/contrib/Meta/archive.rds"
|
||||
)
|
||||
remotes = readRDS(url(
|
||||
"https://cloud.r-project.org/src/contrib/Meta/archive.rds",
|
||||
"rb"
|
||||
))
|
||||
packages = readRDS(url(
|
||||
"https://cran.devxy.io/arm64/noble/latest/src/contrib/PACKAGES.rds",
|
||||
"rb"
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue