The HaarSeg package is neither on CRAN nor on Bioconductor. To install it, use:
install.packages("HaarSeg", repos = "https://henrikbengtsson.r-universe.dev")
This will install the package from source.
To install the pre-release version that is available in Git branch
develop
on GitHub, use:
remotes::install_github("HenrikBengtsson/HaarSeg", ref = "develop")
This will install the package from source.