https://github.com/albersonmiranda/fio
Friendly & Fast Input-Output Matrix Analysis in R, written in Rust.
https://github.com/albersonmiranda/fio
economics r r-package rstats
Last synced: 5 days ago
JSON representation
Friendly & Fast Input-Output Matrix Analysis in R, written in Rust.
- Host: GitHub
- URL: https://github.com/albersonmiranda/fio
- Owner: albersonmiranda
- License: other
- Created: 2024-05-15T02:24:44.000Z (11 months ago)
- Default Branch: dev
- Last Pushed: 2025-04-01T12:52:58.000Z (13 days ago)
- Last Synced: 2025-04-01T13:39:20.293Z (13 days ago)
- Topics: economics, r, r-package, rstats
- Language: R
- Homepage: https://albersonmiranda.github.io/fio/
- Size: 83.4 MB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - albersonmiranda/fio - Friendly & Fast Input-Output Matrix Analysis in R, written in Rust. (R)
README
---
output:
github_document:
html_preview: false
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```# {fio}
Friendly & Fast Input-Output Analysis![]()
[](https://CRAN.R-project.org/package=fio)
[](https://albersonmiranda.r-universe.dev/fio)
[](https://github.com/albersonmiranda/fio/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/albersonmiranda/fio?branch=main)
[](https://CRAN.R-project.org/package=fio)`{fio}` (*Friendly Input-Output*) is a R package designed for input-output analysis, emphasizing usability for Excel users and performance. It includes an [RStudio Addin](https://rstudio.github.io/rstudioaddins/) and a suite of functions for straightforward import of input-output tables from Excel, either programmatically or directly from the clipboard.
The package is optimized for speed and efficiency. It leverages the [R6 class](https://r6.r-lib.org/) for clean, memory-efficient object-oriented programming. Furthermore, all linear algebra computations are implemented in [Rust](https://www.rust-lang.org/) to achieve highly optimized performance.
## Installation
### CRAN Release
You can install the latest stable release of {fio} from CRAN with:
```r
install.packages("fio")
```### Latest Tested version
install the latest tested but unreleased version from the [main branch](https://github.com/albersonmiranda/fio/tree/main), use the precompiled binaries available on [R-universe](https://albersonmiranda.r-universe.dev/fio):
```r
install.packages("fio", repos = c("https://albersonmiranda.r-universe.dev", "https://cloud.r-project.org"))
```### Development version
For the cutting-edge development version from the [dev branch](https://github.com/albersonmiranda/fio/tree/dev), you'll need to compile it from source. This requires [Rust](https://www.rust-lang.org/) to be installed on your system. You can install Rust using the following commands:
- Debian/Ubuntu: `apt-get install cargo`
- Fedora/CentOS: `dnf install cargo`
- macOS: `brew install rust`
- Windows: https://www.rust-lang.org/tools/install## Getting Started
If you are just getting started with `{fio}`, we recommend you to read the [vignettes](https://albersonmiranda.github.io/fio/articles/index.html) for a comprehensive overview of the package.
## Examples
Calculate Leontief's inverse from brazilian 2020 input-output matrix:
```{r example}
# load included dataset
iom_br <- fio::br_2020# calculate technical coefficients matrix
iom_br$compute_tech_coeff()# calculate Leontief's inverse
iom_br$compute_leontief_inverse()
```And pronto! `r emoji::emoji("tada")`, you're all good to carry on with your analysis. You can evoke the Data Viewer to inspect the results with `iom_br$technical_coefficients_matrix |> View()` and `iom_br$leontief_inverse_matrix |> View()`.

*Leontief's inverse from brazilian 2020 input-output matrix*## Related tools
Other great tools for input-output analysis in R include:
- [{leontief}](https://pachamaltese.github.io/leontief/)
- [{ioanalysis}](https://cran.r-project.org/package=ioanalysis)