Package 'fiorefactor'

Title: Rust Powered Toy Package
Description: This is a toy package to test creating an Extendr-powered R package from only Rust code (i.e. not using a R function to wrap and document rust code), including documentation.
Authors: Alberson da Silva Miranda [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-9252-4175>)
Maintainer: Alberson da Silva Miranda <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9005
Built: 2026-05-24 06:46:01 UTC
Source: https://github.com/albersonmiranda/fiorefactor

Help Index


Rust class for input-output matrix

Description

This class represents an input-output matrix, which is a representation of the transactions between different sectors of an economy. It contains methods to compute the technical coefficients matrix and other related operations.

Arguments

name

(character)
A string representing the name of the input-output matrix.

intermediate_transactions

(matrix)
A matrix of intermediate transactions.

total_production

(matrix)
A vector of total production.

Details

This paragraph of details is on struct-level.

But hey! This impl-block adds stuff that requires clarification so this paragraph is on impl-level docs but it's appended to struct docs! Isn't that cool?

Value

A new instance of the Iom class.

Methods

Method new

Instantiate a new Iom object

Arguments
name

(character) A string representing the name of the input-output matrix.

intermediate_transactions

(matrix) A matrix of intermediate transactions.

total_production

(character) A vector of total production.

details

This function creates a new instance of the Iom class.

return

A new instance of the Iom class.

Method intermediate_transactions

Getter for intermediate_transactions matrix.

Method total_production

Getter for total_production matrix.

Method technical_coefficients_matrix

Getter for technical_coefficients_matrix.

Method leontief_inverse_matrix

Getter for leontief_inverse_matrix.

Method compute_technical_coefficients

Compute the technical coefficients matrix and populate the technical_coefficients_matrix field.

details

It computes the technical coefficientex matrix, a nxn matrix, known as A matrix, which is the column-wise ratio of intermediate transactions to total production.

return

Self (invisibly)

Examples

## ---- Method `new` ---- ##
Iom$new(
name = "example",
intermediate_transactions = c(1, 2, 3, 4),
total_production = c(5, 6)
)



## ---- Method `compute_technical_coefficients` ---- ##
iom <- Iom$new(
name = "example",
intermediate_transactions = c(1, 2, 3, 4),
total_production = c(5, 6)
)
iom$compute_technical_coefficients()
iom$technical_coefficients_matrix

Print method for objects of class 'Iom'

Description

Print method for objects of class 'Iom'

Usage

## S3 method for class 'Iom'
print(x, ...)

Arguments

x

An object of class 'Iom'

...

Additional arguments passed to print methods