diff --git a/scripts/install_r_packages.R b/scripts/install_r_packages.R
index b7c465901eb7e39581a916b473d1963dfd0ebda2..f3e42e9f3c9759e80dc57d0c6f27478bd27d8ee6 100644
--- a/scripts/install_r_packages.R
+++ b/scripts/install_r_packages.R
@@ -1,10 +1,10 @@
 #!/usr/bin/env Rscript
 ### Name : install_r_packages.R
 ### Folder : ~/scripts
-### Date : 17/04/2023
+### Date : 22/08/2024 from previous version 17/04/2023
 ### Aim : Install all packages from CRAN, BioConductor or github, requiered in the Shiny app.
 
-### Install pak packages first
+### Install some first pakcages included pak
 # Specify your packages
 my_packages <- c("pak","pkgcache","pkgdepends","pillar", "shinipsum")
 # Extract not installed packages                                       
@@ -18,16 +18,20 @@ if(length(not_installed)){
     print("packages previously installed in the basic image")
 }
 
-#### Load file with the list of packages
-packages_list <- read.csv(file = "/opt/scripts/packages_to_install.csv", header = TRUE, sep = ";", stringsAsFactors = FALSE)
+#### Load file with the list of packages for installation of supplementary packages
+#### Part used in shiny-example docker images for install packages needed for shiny app
+additional_packages <- read.csv(file = "/opt/scripts/packages_to_install.csv", header = TRUE, sep = ";", stringsAsFactors = FALSE)
+packages_name <- additional_packages$Package_name
+#### Selection of packages not yet installed
+packages_needed <- packages_name[!(packages_name %in% installed.packages()[ , "Package"])]
 print("Installation for other packages needed : ")
-print(paste(packages_list$Package_name, sep = "",collapse = ","))
+print(paste(packages_needed, sep = "",collapse = ","))
 
 ### Install packages with dependencies with pak packages
-for (i in 1:length(packages_list$Package_name)) {
+for (i in 1:length(packages_needed)) {
     print("Installation of: ")
-    print(packages_list$Package_name[i])
-    pak::pkg_install(pkg = packages_list$Package_name[i])
+    print(packages_needed[i])
+    pak::pkg_install(pkg = packages_needed[i])
     print("Installation done!!")
 }
 # clean the cache of pak