In order to install SPATA2 with all its dependencies in the right order enter the following commands.

# packages from biocmanager
if(!requireNamespace("BiocManager", quietly = TRUE)){
  
  install.packages("BiocManager")
      
}

BiocManager::install(c('BiocGenerics', 'DelayedArray', 'DelayedMatrixStats',
                       'limma', 'S4Vectors', 'SingleCellExperiment',
                       'SummarizedExperiment', 'batchelor', 'Matrix.utils', 'EBImage'))

# packages from github
if(!requireNamespace("devtools", quietly = TRUE)){
  
  install.packages("devtools")
  
}

devtools::install_github(repo = "kueckelj/confuns")
devtools::install_github(repo = "theMILOlab/SPATAData")
devtools::install_github(repo = "theMILOlab/SPATA2")