eng_gretl: Package to Run gretl Scripts from R Markdown

Description Usage Arguments Details Value Author(s) References Examples

View source: R/eng_gretl.R

Description

This package runs on top of knitr to facilitate communication with gretl. Run gretl scripts from R Markdown document.

Usage

1

Arguments

options

Chunk options, as provided by knitr during chunk execution. Chunk option for this is gretl

Details

The gretl can be activated via

1
knitr::knit_engines$set(gretl = gretlR::eng_gretl)

This will be set within an R Markdown document's setup chunk.

Value

Set of gretl (Gnu Regression, Econometrics and Time-series Library) codes

Author(s)

*Sagiru Mati, ORCID: 0000-0003-1413-3974, https://smati.com.ng

* Yusuf Maitama Sule (Northwest) University Kano, Nigeria

* SMATI Academy

References

Bob Rudis (2015).Running Go language chunks in R Markdown (Rmd) files. Available at: https://gist.github.com/hrbrmstr/9accf90e63d852337cb7 Yihui Xie (2019). knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.24.

Yihui Xie (2015) Dynamic Documents with R and knitr. 2nd edition. Chapman and Hall/CRC. ISBN 978-1498716963

Yihui Xie (2014) knitr: A Comprehensive Tool for Reproducible Research in R. In Victoria Stodden, Friedrich Leisch and Roger D. Peng, editors, Implementing Reproducible Computational Research. Chapman and Hall/CRC. ISBN 978-1466561595

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
knitr::knit_engines$set(gretl = gretlR::eng_gretl)
## Not run: 

library(gretlR)

# Copy and paste the following chunk in R Markdown document

```{gretl gretlR,eval=T,echo=F,comment=NULL}
nulldata 500
set seed 13
gretl1 = normal()
gretl2 = normal()
setobs 12 1980:01 --time-series
gnuplot gretl1 --time-series --with-lines --output="line.png"
gnuplot gretl2 gretl1 --output="scatter.png"
ols gretl1 const gretl2
modeltab add
tabprint --output="ols.Rmd"
eqnprint --output="olsmodel.Rmd"
tabprint --output="ols.csv"
```


## End(Not run)

gretlR documentation built on July 2, 2020, 3:21 a.m.