From dbf3de0faf1321972b91d17b2e2e2f0b384d7402 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 25 Aug 2014 17:11:23 +0200 Subject: Make it possible to save summaries as text files --- inst/GUI/gmkin.R | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'inst/GUI') 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("
", capture.output(stmp), "
"), - cont = f.gn, label = "Summary") + cont = f.gg.summary, label = "Summary") options(width = oldwidth) # Plot options {{{4 -- cgit v1.2.1