aboutsummaryrefslogtreecommitdiff
path: root/man/FOCUS_Step_12_scenarios.Rd
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2017-05-16 15:43:50 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2017-05-16 15:43:50 +0200
commit36036b5901223591e7e21e8b73d8cd1fb034f4cb (patch)
treeed8e764778aa2e94b785263d18d7d8e3dfe4e785 /man/FOCUS_Step_12_scenarios.Rd
parentd042f8f06b313e8595087587455daac73d84f17b (diff)
Finish the Step 1 calculator including tests
Some cleaning up. PELMO facilities do not currently work at my end, as I have no working wine installation on this computer
Diffstat (limited to 'man/FOCUS_Step_12_scenarios.Rd')
-rw-r--r--man/FOCUS_Step_12_scenarios.Rd40
1 files changed, 40 insertions, 0 deletions
diff --git a/man/FOCUS_Step_12_scenarios.Rd b/man/FOCUS_Step_12_scenarios.Rd
new file mode 100644
index 0000000..f58dea7
--- /dev/null
+++ b/man/FOCUS_Step_12_scenarios.Rd
@@ -0,0 +1,40 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/FOCUS_Step_12_scenarios.R
+\docType{data}
+\name{FOCUS_Step_12_scenarios}
+\alias{FOCUS_Step_12_scenarios}
+\title{Step 1/2 scenario data as distributed with the FOCUS Step 1/2 calculator}
+\format{A list containing the scenario names in a character vector called 'names',
+ the drift percentiles in a matrix called 'drift', interception percentages in
+ a matrix called 'interception' and the runoff/drainage percentages for Step 2
+ calculations in a matrix called 'rd'.}
+\description{
+The data were extracted from the scenario.txt file using the R code shown below.
+The text file 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
+ scenario_path <- "inst/extdata/FOCUS_Step_12_scenarios.txt"
+ scenarios <- readLines(scenario_path)[9:38]
+ FOCUS_Step_12_scenarios <- list()
+ sce <- read.table(text = scenarios, sep = "\\t", header = TRUE, check.names = FALSE,
+ stringsAsFactors = FALSE)
+ FOCUS_Step_12_scenarios$names = sce$Crop
+ rownames(sce) <- sce$Crop
+ FOCUS_Step_12_scenarios$drift = sce[, 3:11]
+ FOCUS_Step_12_scenarios$interception = sce[, 12:15]
+ sce_2 <- readLines(scenario_path)[41:46]
+ rd <- read.table(text = sce_2, sep = "\\t")[1:2]
+ rd_mat <- matrix(rd$V2, nrow = 3, byrow = FALSE)
+ dimnames(rd_mat) = list(Time = c("Oct-Feb", "Mar-May", "Jun-Sep"),
+ Region = c("North", "South"))
+ FOCUS_Step_12_scenarios$rd = rd_mat
+ save(FOCUS_Step_12_scenarios, file = "data/FOCUS_Step_12_scenarios.RData")
+}
+
+# And this is the resulting data
+FOCUS_Step_12_scenarios
+}
+\keyword{datasets}

Contact - Imprint