diff --git a/NEWS.md b/NEWS.md index a652ce06..16140082 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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` diff --git a/R/tables.R b/R/tables.R index b7228658..be4f59e8 100644 --- a/R/tables.R +++ b/R/tables.R @@ -49,4 +49,19 @@ #' \item{var}{The name of the weight} #' \item{weight}{weighing factor} #' } -"weight.obic" \ No newline at end of file +"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" \ No newline at end of file diff --git a/data/column_description_obic.RData b/data/column_description_obic.RData new file mode 100644 index 00000000..635756f8 Binary files /dev/null and b/data/column_description_obic.RData differ diff --git a/man/column_description.obic.Rd b/man/column_description.obic.Rd new file mode 100644 index 00000000..acf96d78 --- /dev/null +++ b/man/column_description.obic.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/tables.R +\docType{data} +\name{column_description.obic} +\alias{column_description.obic} +\title{Column description for the OIC} +\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} +}} +\usage{ +column_description.obic +} +\description{ +This table defines the columns used in the OBIC and which unit is used +} +\keyword{datasets} diff --git a/vignettes/description-of-the-columns.Rmd b/vignettes/description-of-the-columns.Rmd new file mode 100644 index 00000000..252ca93e --- /dev/null +++ b/vignettes/description-of-the-columns.Rmd @@ -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) +``` diff --git a/vignettes/explaination-of-the-OBIC-package.Rmd b/vignettes/explaination-of-the-OBIC-package.Rmd deleted file mode 100644 index a06596f9..00000000 --- a/vignettes/explaination-of-the-OBIC-package.Rmd +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "Explaination of the OBIC package" -author: "Sven Verweij & Gerard Ros" -date: "`r Sys.Date()`" -output: rmarkdown::html_vignette -vignette: > - %\VignetteIndexEntry{explaination-of-the-OBIC-package} - %\VignetteEngine{knitr::rmarkdown} - %\VignetteEncoding{UTF-8} ---- - -```{r, include = FALSE} -knitr::opts_chunk$set( - collapse = TRUE, - comment = "#>" -) -``` - -```{r setup} -library(OBIC) -``` - -## Introduction - -The `OBIC` package contains the functions for the Open Bodem Index. The purpose of these functions is to evaluate the soil for agricultural purposes. - -## Input data - -## Indices - -### Crumbleability - -### Phosphate availability - -### Soil sealing - -### Soil resistance -