Program to get all R packages
////////////////////////////////
loc<-"http://cran.us.r-project.org"

x<-available.packages(repos =loc)
df<-data.frame(x)
dim(df)  # [1] 20287    17
colnames(df)

 [1] "Package"               "Version"               "Priority"             
 [4] "Depends"               "Imports"               "LinkingTo"            
 [7] "Suggests"              "Enhances"              "License"              
[10] "License_is_FOSS"       "License_restricts_use" "OS_type"              
[13] "Archs"                 "MD5sum"                "NeedsCompilation"     
[16] "File"                  "Repository"                

 head(df,2)
                    Package Version Priority                        Depends Imports LinkingTo
A3                       A3   1.0.0     <NA> R (>= 2.15.0), xtable, pbapply    <NA>      <NA>
AalenJohansen AalenJohansen     1.0     <NA>                           <NA>    <NA>      <NA>
                         Suggests Enhances    License License_is_FOSS License_restricts_use
A3            randomForest, e1071     <NA> GPL (>= 2)            <NA>                  <NA>
AalenJohansen    knitr, rmarkdown     <NA> GPL (>= 2)            <NA>                  <NA>
              OS_type Archs                           MD5sum NeedsCompilation File
A3               <NA>  <NA> 027ebdd8affce8f0effaecfcd5f5ade2               no <NA>
AalenJohansen    <NA>  <NA> d7eb2a6275daa6af43bf8a980398b312               no <NA>
                                            Repository
A3            http://cran.us.r-project.org/src/contrib
AalenJohansen http://cran.us.r-project.org/src/contrib
///////////////////////////////

Link for a table of R packages
////////////////////////////////

Step 1: Go to https://r-project.org
Step 2: Choose a mirror (location)
Step 3: Click on 'packages' on the left
Step 4: Choose a list (out of two)

https://archive.linux.duke.edu/cran/web/packages/available_packages_by_date.html

///////////////////////////////

R program to generate allRpackages.RData 
////////////////////////////////
# 1/5/2024 Currently, the CRAN package repository features 21860 available packages.

infile<-"https://archive.linux.duke.edu/cran/web/packages/available_packages_by_date.html"
x<-readLines(infile)

length(x) # [1] 25857
x2<-x[grep('web/packages',x)]
length(x2)  # [1] 21855 close to 21860
x3<-sub('.*<span class="CRAN">','',x2)
x4<-sub('</td> *</tr>','',x3)

x5<-sub(',','<>',x4)
x6<-sub('</span>.*<td>',',',x5)

write.csv(x6,file='c://temp/t.csv',quote=F,row.names=F,col.names=F)

.x <- read.table('c://temp/t2.txt', sep =',', quote = '"', fill = TRUE, header = FALSE)
colnames(.x)<-c("NAME","EXPLANATION")
.x$EXPLANATION<-sub('<>',',',.x$EXPLANATION)
save(.x,file='c://temp/allRpackages.RData')
///////////////////////////////