-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.Rmd
55 lines (38 loc) · 1.22 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{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).