aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-01-13 14:05:31 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2015-01-13 14:36:16 +0100
commit891af5d0f1ee8d45cd4403af43293463d23ba96b (patch)
treebf4b40b47796b9973dc3d78dde20a8a8e8c2ef22 /README.md
parent4d74570f1ca4a94d894c6c5169684a8246d0a51c (diff)
README.rmd with example, fix reading unzipped files
Diffstat (limited to 'README.md')
-rw-r--r--README.md67
1 files changed, 65 insertions, 2 deletions
diff --git a/README.md b/README.md
index 523fdcf..3f0091f 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
# pfm
The R package **pfm** provides some utilities for dealing with FOCUS pesticide fate modelling tools,
-made available under the GNU public license. This means:
+(currently only TOXSWA cwa files), made available under the GNU public license.
+This means:
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -23,7 +24,69 @@ using the `devtools` package. Using `quick = TRUE` skips docs,
multiple-architecture builds, demos, and vignettes, to make installation as
fast and painless as possible.
-```s
+
+```r
library(devtools)
install_github("jranke/pfm", subdir = "pkg", quick = TRUE)
```
+
+To read in and analyse a cwa file:
+
+
+```r
+library(pfm)
+```
+
+```
+## Loading required package: R6
+```
+
+```r
+example_cwa <- read.TOXSWA_cwa("00003s_pa.cwa")
+plot(example_cwa)
+```
+
+```
+## Warning in title(...): Konvertierungsfehler für 'Concentration [μg/L]' in
+## 'mbcsToSbcs': Punkt ersetzt <ce>
+```
+
+```
+## Warning in title(...): Konvertierungsfehler für 'Concentration [μg/L]' in
+## 'mbcsToSbcs': Punkt ersetzt <bc>
+```
+
+![plot of chunk unnamed-chunk-2](figure/unnamed-chunk-2-1.png)
+
+```r
+example_cwa$get_events(c(20, 100))
+example_cwa$moving_windows(c(7, 21))
+print(example_cwa)
+```
+
+```
+## <TOXSWA_cwa> data from file 00003s_pa.cwa segment 20
+## datetime t t_firstjan t_rel_to_max cwa_mug_per_L
+## 20 1978-10-01 00:00:00 0.000 273.0000 -55.333 0
+## 40 1978-10-01 01:00:00 0.042 273.0417 -55.291 0
+## 60 1978-10-01 02:00:00 0.083 273.0833 -55.250 0
+## 80 1978-10-01 03:00:00 0.125 273.1250 -55.208 0
+## 100 1978-10-01 04:00:00 0.167 273.1667 -55.166 0
+## 120 1978-10-01 05:00:00 0.208 273.2083 -55.125 0
+## cwa_tot_mug_per_L
+## 20 0
+## 40 0
+## 60 0
+## 80 0
+## 100 0
+## 120 0
+## Moving window analysis
+## window max_TWAC max_AUC_h max_AUC_d
+## 1 7 days 2.3926551 401.9660 16.74859
+## 2 21 days 0.8369248 421.8101 17.57542
+## Event statistics for threshold 20
+## t_start cwa_max duration pre_interval AUC_h AUC_d
+## 1 55.083 40.58401 0.417 55.083 365.7912 15.2413
+## Event statistics for threshold 100
+## No events found
+```

Contact - Imprint