Skip to content

Commit

Permalink
Merge pull request #46 from springgbv/add-column-description
Browse files Browse the repository at this point in the history
Add description of the columns for the OBIC
  • Loading branch information
SvenVw authored Nov 29, 2019
2 parents 2255090 + 3663dac commit 66eb058
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 39 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## UNRELEASED
### Added
* Adds the leaching of nitrogen to surface water and groundwater #17
* Adds a table with the description of the columns and a vignette about it #46

### Changed
* Update of crumbeability groups in `crops.obic`
Expand Down
17 changes: 16 additions & 1 deletion R/tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,19 @@
#' \item{var}{The name of the weight}
#' \item{weight}{weighing factor}
#' }
"weight.obic"
"weight.obic"

#' Column description for the OIC
#'
#' This table defines the columns used in the OBIC and which unit is used
#'
#' @format A data.frame with 126 rows and 6 columns:
#' \describe{
#' \item{column}{The column name used in OBIC}
#' \item{type}{The type of column}
#' \item{description_nl}{A description of the column in Dutch}
#' \item{description_en}{A description of the column in English}
#' \item{unit}{The unit used for this column}
#' \item{method}{The method to measure/obtain the values for this column}
#' }
"column_description.obic"
Binary file added data/column_description_obic.RData
Binary file not shown.
22 changes: 22 additions & 0 deletions man/column_description.obic.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions vignettes/description-of-the-columns.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "Description of the columns for OBIC"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{description-of-the-columns}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

```{r setup}
library(OBIC)
```


The main function of the package `obic()` requires as input a `data.table` with specific columns.
These columns are specified in `OBIC::column_description.obic` and can also be seen in the table below


```{r table}
desc <- OBIC::column_description.obic
knitr::kable(desc)
```
38 changes: 0 additions & 38 deletions vignettes/explaination-of-the-OBIC-package.Rmd

This file was deleted.

0 comments on commit 66eb058

Please sign in to comment.