From 6e4a152925011528c21937f12bc53042a53f72de Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 11 Jun 2015 10:13:18 +0200 Subject: JKI drift percentage data for field crops and pome/stone fruit --- pkg/.Rbuildignore | 1 + pkg/DESCRIPTION | 2 +- pkg/R/drift_data_JKI.R | 42 ++++++++++++++++++++++++++++++++++++++ pkg/data/drift_data_JKI.RData | Bin 0 -> 972 bytes pkg/man/drift_data_JKI.Rd | 46 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 pkg/R/drift_data_JKI.R create mode 100644 pkg/data/drift_data_JKI.RData create mode 100644 pkg/man/drift_data_JKI.Rd (limited to 'pkg') diff --git a/pkg/.Rbuildignore b/pkg/.Rbuildignore index c56e58e..c48d8e3 100644 --- a/pkg/.Rbuildignore +++ b/pkg/.Rbuildignore @@ -1,2 +1,3 @@ inst/testdata/SwashProjects/project_H_sw/MACRO/*/*.bin inst/testdata/Swash/ +inst/extdata/Tabelle\ der\ Abdrifteckwerte.xls diff --git a/pkg/DESCRIPTION b/pkg/DESCRIPTION index a6880f2..98e9142 100644 --- a/pkg/DESCRIPTION +++ b/pkg/DESCRIPTION @@ -2,7 +2,7 @@ Package: pfm Type: Package Title: Utilities for pesticide fate modelling Version: 0.1-3 -Date: 2015-05-07 +Date: 2015-06-11 Authors@R: person("Johannes Ranke", email = "jranke@uni-bremen.de", role = c("aut", "cre", "cph")) Description: Utilities for simple PEC calculations and for dealing with data diff --git a/pkg/R/drift_data_JKI.R b/pkg/R/drift_data_JKI.R new file mode 100644 index 0000000..44a959b --- /dev/null +++ b/pkg/R/drift_data_JKI.R @@ -0,0 +1,42 @@ +#' Deposition from spray drift expressed as percent of the applied dose as +#' published by the JKI +#' +#' Deposition from spray drift expressed as percent of the applied dose as +#' published by the German Julius-Kühn Institute (JKI). +#' +#' The data were extracted from the spreadsheet cited below using the R code +#' given in the example section. The spreadsheet is not included in the package +#' as its licence is not clear. +#' +#' +#' @name drift_data_JKI +#' @docType data +#' @format A list currently containing matrices with spray drift percentage +#' data for field crops (Ackerbau), and Pome/stone fruit, early and late +#' (Obstbau früh, spät). +#' @source JKI (2010) Spreadsheet 'Tabelle der Abdrifteckwerte.xls', retrieved +#' from +#' http://www.jki.bund.de/no_cache/de/startseite/institute/anwendungstechnik/abdrift-eckwerte.html +#' on 2015-06-11 +#' @keywords datasets +#' @examples +#' +#' \dontrun{ +#' # This is the code that was used to extract the data +#' library(readxl) +#' abdrift_path <- "../inst/extdata/Tabelle der Abdrifteckwerte.xls" +#' JKI_crops <- c("Ackerbau", "Obstbau früh", "Obstbau spät") +#' names(JKI_crops) <- c("Field crops", "Pome/stone fruit, early", "Pome/stone fruit, late") +#' drift_data_JKI <- list() +#' +#' for (n in 1:8) { +#' drift_data_raw <- read_excel(abdrift_path, sheet = n + 1, skip = 2) +#' drift_data <- as.matrix(drift_data_raw[1:9, 2:4]) +#' dimnames(drift_data) <- list(distance = as.integer(drift_data_raw[1:9, 1]), +#' crop = JKI_crops) +#' drift_data_JKI[[n]] <- drift_data +#' } +#' save(drift_data_JKI, file = "../data/drift_data_JKI.RData") +#' } +#' +NULL diff --git a/pkg/data/drift_data_JKI.RData b/pkg/data/drift_data_JKI.RData new file mode 100644 index 0000000..061ca27 Binary files /dev/null and b/pkg/data/drift_data_JKI.RData differ diff --git a/pkg/man/drift_data_JKI.Rd b/pkg/man/drift_data_JKI.Rd new file mode 100644 index 0000000..a2bbb77 --- /dev/null +++ b/pkg/man/drift_data_JKI.Rd @@ -0,0 +1,46 @@ +% Generated by roxygen2 (4.1.0.9001): do not edit by hand +% Please edit documentation in R/drift_data_JKI.R +\docType{data} +\name{drift_data_JKI} +\alias{drift_data_JKI} +\title{Deposition from spray drift expressed as percent of the applied dose as +published by the JKI} +\format{A list currently containing matrices with spray drift percentage +data for field crops (Ackerbau), and Pome/stone fruit, early and late +(Obstbau früh, spät).} +\source{ +JKI (2010) Spreadsheet 'Tabelle der Abdrifteckwerte.xls', retrieved +from +http://www.jki.bund.de/no_cache/de/startseite/institute/anwendungstechnik/abdrift-eckwerte.html +on 2015-06-11 +} +\description{ +Deposition from spray drift expressed as percent of the applied dose as +published by the German Julius-Kühn Institute (JKI). +} +\details{ +The data were extracted from the spreadsheet cited below using the R code +given in the example section. The spreadsheet is not included in the package +as its licence is not clear. +} +\examples{ +\dontrun{ + # This is the code that was used to extract the data + library(readxl) + abdrift_path <- "../inst/extdata/Tabelle der Abdrifteckwerte.xls" + JKI_crops <- c("Ackerbau", "Obstbau früh", "Obstbau spät") + names(JKI_crops) <- c("Field crops", "Pome/stone fruit, early", "Pome/stone fruit, late") + drift_data_JKI <- list() + + for (n in 1:8) { + drift_data_raw <- read_excel(abdrift_path, sheet = n + 1, skip = 2) + drift_data <- as.matrix(drift_data_raw[1:9, 2:4]) + dimnames(drift_data) <- list(distance = as.integer(drift_data_raw[1:9, 1]), + crop = JKI_crops) + drift_data_JKI[[n]] <- drift_data + } + save(drift_data_JKI, file = "../data/drift_data_JKI.RData") +} +} +\keyword{datasets} + -- cgit v1.2.1