The R package sfc is a tool for substance flow computation, which can finally be used in substance flow analysis (SFA).
You can use devtools to install the development version from Github:
install.packages("devtools")
# devtools::install_github("ctfysh/sfc")
install.packages("sfc", repos = c('https://ctfysh.r-universe.dev', 'https://cloud.r-project.org'))
This package is free and open source software, licensed under GPL.