aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-08-25 17:11:23 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2014-08-25 17:11:23 +0200
commitdbf3de0faf1321972b91d17b2e2e2f0b384d7402 (patch)
treea41aed2328585d12e109b3944c03cf7cadd1415b
parentb49586a6f80dba1502da45272b631e15bb162a52 (diff)
Make it possible to save summaries as text files
-rw-r--r--NEWS.md2
-rw-r--r--inst/GUI/gmkin.R10
2 files changed, 11 insertions, 1 deletions
diff --git a/NEWS.md b/NEWS.md
index 138cf3a..847abcb 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -6,6 +6,8 @@
- Make it possible to specify the maximum number of iterations for these algorithms
+- Provide the possibility to save summaries as text file
+
## BUG FIXES
- Sorting in the fit table now works correctly also for more than 9 fits
diff --git a/inst/GUI/gmkin.R b/inst/GUI/gmkin.R
index a582a8a..ff98c32 100644
--- a/inst/GUI/gmkin.R
+++ b/inst/GUI/gmkin.R
@@ -896,8 +896,16 @@ f.gg.opts.maxit.modFit <- gedit("auto", label = "maxit.modFit",
# Summary {{{3
oldwidth <- options()$width
options(width = 90)
+summaryfile <- paste(ds[[ds.cur]]$title, "_", m[[m.cur]]$name, ".txt", sep = "")
+f.gg.summary <- ggroup(label = "Summary", cont = f.gn, horizontal = FALSE)
+f.gg.summary.topline <- ggroup(cont = f.gg.summary, horizontal = TRUE)
+f.gg.summary.filename <- gedit(summaryfile, width = 50, cont = f.gg.summary.topline)
+f.gg.summary.savebutton <- gbutton("Save summary", cont = f.gg.summary.topline,
+ handler = function(h, ...) {
+ capture.output(stmp, file = summaryfile)
+ })
f.gg.summary <- ghtml(c("<pre>", capture.output(stmp), "</pre>"),
- cont = f.gn, label = "Summary")
+ cont = f.gg.summary, label = "Summary")
options(width = oldwidth)
# Plot options {{{4

Contact - Imprint