Learn R Programming

intubate (version 1.0.0)

systemfit: Interfaces for systemfit package for data science pipelines.

Description

Interfaces to systemfit functions that can be used in a pipeline implemented by magrittr.

Usage

ntbt_systemfit(data, ...)

Arguments

data
data frame, tibble, list, ...
...
Other arguments passed to the corresponding interfaced function.

Value

Object returned by interfaced function.

Details

Interfaces call their corresponding interfaced function.

Examples

Run this code
## Not run: 
# library(intubate)
# library(magrittr)
# library(systemfit)
# 
# 
# ## ntbt_systemfit: Linear Equation System Estimation
# data("Kmenta")
# eqDemand <- consump ~ price + income
# eqSupply <- consump ~ price + farmPrice + trend
# system <- list( demand = eqDemand, supply = eqSupply )
# 
# 
# ## Original function to interface
# fitols <- systemfit(system, data = Kmenta)
# print(fitols)
# 
# ## The interface puts data as first parameter
# fitols <- ntbt_systemfit(Kmenta, system, "<|F|>")
# ## Need "<|F|>" (at least for now) to clarify it is a formula
# print(fitols)
# 
# ## so it can be used easily in a pipeline.
# ## Need "<|F|>" (at least for now) to clarify it is a formula
# Kmenta %>%
#   ntbt_systemfit(system, "<|F|>") %>%
#   print()
# ## End(Not run)

Run the code above in your browser using DataLab