Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jsta/nml

An R package for parsing Fortran namelist files :tophat:
https://github.com/jsta/nml

fortran namelist

Last synced: about 2 months ago
JSON representation

An R package for parsing Fortran namelist files :tophat:

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

# nml

[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/wip.svg)](http://www.repostatus.org/#wip)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/nml)](https://cran.r-project.org/package=nml)

An R parser of Fortran namelist files.

## Installation

You can install nml from github with:

```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("jsta/nml")
```

## Example

### Using the R parser

```{r }
library(nml)
read_nml("tests/testthat/sample.nml")
```

### Using the `f90nml` python parser via the `reticulate` bridge

```{r }
library(reticulate)
use_python("/home/jose/anaconda3/bin/python")

f90nml <- import("f90nml")
pd <- import("pandas")

nml <- f90nml$read("tests/testthat/sample.nml")

pd$DataFrame$from_dict(nml)
```

## Prior Art

This package was inspired by [f90nml](https://github.com/marshallward/f90nml) and [glmtools](https://github.com/USGS-R/glmtools).