Documention for value in secondStageTest looks strange.

Multiple Setting:
Default: NCP (throw out n, \sigma, \mu)
Instead of c(0,0,...) use #hypotheses text fields.
Remove setting + check for empty textfields
Move power simulation options on the right side of the simulation window
In Options: Weights of subgraphs are upscaled to 1 Yes (Bretz et al. 2011) / No 
Change test to only "Bonferroni", "Simes", "parametric" and add parameter upscale to 'gMCP' (and change exhaust)
Allow upscale for Simes test? (Theory!)
Is the shortcut really used for the Simes test (it can not be used for adjusted p-values, but if these are not asked for the shortcut should be used).
Remember multiple setting options and add "clear" button. Save settings under name.
"Select an R correlation matrix" -> "?"
Add labels to "create matrix" and "refresh".
_Always_ use correlation matrix - never covariance matrix. Check for this for imports (and ask for converting to corMat). In the GUI disable diagonal.
User specified power functions should be namable in the GUI. Save output as data.frame and CSV.
Simes -> simply -> "Use Simes test" -> Show "Warning dialog exlaining..." with check box "never show me again".
Improve "Graph Analysis" -> Check whether weights sum up to 1 for all subgraphs.
Sample Sizes: Drop "n" column,  
Replace n, \sigma, \mu with \theta θ and Standard error of \theta.
Specify marginal power (and one field for which alpha this power was calculated).
Entangled graph should shown be separately.
subgraph alpha splitting -> component graph weights
Tabs for the entangled graphs are called "transition matrix 1", "transition matrix 2", "trasition matrix 3"
Entangled graphs: Alpha level -> Weights 1, Weights 2, Weights 3
- NEWS.Rd and news()

- Streamline / throw out graphTest
- Highlight edges (and perhaps nodes) depending on the focus in the dataframe. 

- Unify graphMCP and entangled graphs?
- Integrate parameter 'envir' into corMatWizard.
- Use jgr.addMenu, jgr.addMenuItem.
- Explain that the order of the rejected hypotheses doesn't affect the end result.
- Report was send dialog is sometimes behind ErrorReport.
- http://semver.org/ Should we switch from version numbers like 0.8-3 to 0.8.3?
- NICER BUGREPORT!
- Let user choose colors for entangled graphs.
- Simes and power
- Simes + parametric test for entangled graphs.
- Optionally display alpha weighting directly in entangled graphs.
- Save settings for power and remember them in the same session.
- Names for userdefined functions.
- Make node bigger for a huge number of entangled layers? (Or arrange them in a different way?)
- Disable CI and adj.P for entangled graphs.
- graph2latex for entangled graphs.
- Black&White version in graph2latex
- Link to archive is wrong on bundle site.
- Removing layer from entangled graphs does not remove weights?
- GUI speed optimization (try Ferber II with 15x5)
- Also check layout of (result) dialogs for big graphs.
- Check copyright notes for code under BSD Licence
- Give more information about "testing mode" - one time JOptionPane for example.
- Find good color set for entangled graphs.
- Check whether parametric test mode is set correctly in power simulations.
- Why is RControl.getR().getHistory() not accessible when the gMCP call fails?
- Umlaute in literatur.bib, e.g. Röhmel
- .asRLogical().getData()[0] can be true but NA in R
- look at warnings regarding exhaustAlpha (also optimality of graph)
- Email subscription on start page (also tell user after 10th start of GUI)
- Warn user if he uses a version that is older than 1 year.
- Warn/inform user about changes.
- Does contrMat(n=c(10, 20, 30, 40), type ="Dunnett") do what I want?!?
- Read and check ?validObject
- For parametric procedures there is no "reset" button (->variables)
- Description (.Rd files) of graphGUI and corMatWizard
- Bauer & Hackel
- "Find out what's changed in ggplot2 with"
  "news(Version=="0.9.1", package="ggplot")"
- Add line width to edge attributes (as color)
- As soon as weights for nodes are implemented, change Improved Fallback one to (w_1,w_2,w_3) and edges (now 1/2,1/2) to \gamma, 1-\gamma with \gamma=w2/(w1_w2))
- Save power scenarios
- Correlation matrix save & restore
- positive Definitheit!
- Sample size is ignored in CorMatDialog
- Konsonanz erzwingen?
- Ist der Single-Step-Dunnett als Graph darstellbar?
- two-sided tests?
- Unify single NCP and multiple NCPs
- Export user defined functions and allow names for them
- CI Dialog testen!
- Selection is awkward. After first dragging one edge is always fixed to the same point.
- Check in CI zu max(0, ..) bzw. min(0, ..) / means
- keine p-Werte übernehmen
- Buttons to load R objects for power dialog.
- check whether we want to use java.math.BigDecimal somewhere.
- Improve and use in manuals/examples/etc. getWeights, getMatrix (should e.g. convert "1/3" to numeric 0.3333), etc.
=== POWER ===
- Erben der Korrelationsmatrix vom Hauptfenster (warn if this is not the case?)
- Copy&Paste of Results (Table, Text, allow to save)
- Scenarios for power
- listen von Stichproben
- Output von power calculations
- positive Definitheit
- test whether correlation is applicable:
  - Simes test -> postitive regression dependence (warn)
  - Dunnett -> ?
- Sequentielle Power ist schwierig (basiert am Ende auf zu wenig Fallzahl der Simulation)
- verbose output for parametric tests
- integrate the two files "tests.R" and "unirootbug.Rd" in directory "unitTests" into unit tests. 
- improve behavior of tables if "Automatically enter the editing mode, whenever a table cell gets the focus" is set to false.
- round values in CI Dialog
- "Packages should not write in the users’ home filespace, nor anywhere else on the file system apart from the R session’s temporary directory (or during installation in the location pointed to by TMPDIR: and such usage should be cleaned up). Installing into the system’s R installation (e.g., scripts to its bin directory) is not allowed. Limited exceptions may be allowed in interactive sessions if the package obtains confirmation from the user."
Check config, logfile, ...

- JHLIR creates variable .jhlir.errors in global environment.

- Characterize optimal graphs.

- Join two graphs in GUI.

- Export matrix with 1/2 as 0.5 but add label as attribute
- Save labels as edge / node attributes?

- For the resulting graph a new option keepWeight
  is introduced in the functions gMCP and rejectNode:
  A node without outgoing edges is removed.
  Should its weight become 0 or should it keep its weight?

- JToggleButton also for new edges.
- Also let an dialog (optionally) pop up to ask for the edge weight. 

Regarding LaTeXTool.StringToLaTeX:
- (1+1/2)/2 as edge weight creates an error.
- "(1+2ε)/3"  ->   "\frac{{(1+2ε)}}{3}" Why is ε not replaced.

- Options for Edge label font size etc?

Is this still the case?
- In CI-Dialog (initial weights instead of alpha are displayed - these are two errors)

- Activate parse2numeric again in PowerDialog if (and only if) graph@m doesn't contain NAs afterwards.

.tmpGraph <- generalSuccessive()

gMCP:::calcMultiPower(weights = .tmpGraph@weights, alpha = 0.05, G = .tmpGraph@m, muL = list(c(0, 0, 0, 0)), sigmaL = list(c(1, 1, 1, 1)), nL = list(c(10, 10, 10, 10)), sigma = matrix(c(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), nrow = 4), nSim = 10000, type = "quasirandom", variables = list(delta = c(0,0.5), gamma = c(0,0.5)))

Error in calcPower(weights = .tmpGraph@weights, alpha = 0.05, G = .tmpGraph@m,  : 
  unused argument(s) (test = "Bretz2011")

Critical:
=========

- Test (and perhaps fix) the following: graphGUI("graph", envir=new.env())
- Think about JavaGD devices. (User wants to plot in R Console etc.)
- Does Deducer interfere JavaGD? (When is .onLoad executed?)
- Make JavaGD only a suggest (Solaris and generally safer)
- Create function for renaming of graph nodes in R
- Check installed structure of Windows binary.

High priority:
==============

- Show optional dialog when refresh button is pressed.
- Check java.awt.Desktop.open in the newest Ubuntu (or is there something else wrong?)
- graphTest's last.alphas at least contain strange NaN in some cases
g <- parallelGatekeeping()
graphTest(pvalues=c(0, 1, 0, 0), alpha=0.05, graph=graph)
[...]
attr(,"last.alphas")
[1] NaN NaN   0   0

- Give link to gMCP mailing list
- HighRes option for PNG export

- Update description / references in "Example Graphs"
- graphTest renames hypotheses to H1...Hn or drops them completely in the output
- Björns Mail
- "Note that with the exceptions of INDEX, LICENSE/LICENCE and NEWS, information files at the top level
  of the package will not be installed and so not be known to users of Windows and Mac OS X 
  compiled packages (and not seen by those who use R CMD INSTALL or install.packages on the tarball). 
  So any information files you wish an end user to see should be included in inst. 
  Note that if the named exceptions also occur in inst, the versions in inst will be that seen in 
  the installed package."
- "The preferred location for vignette sources is now the directory
  vignettes and not inst/doc: R CMD build will now re-build
  vignettes in directory vignettes and copy the .Rnw (etc) files
  and the corresponding PDFs to inst/doc.  Further files to be
  copied to inst/doc can be specified _via_ the file
  vignettes/.install_extras."
- "The package environment is sealed, so you cannot use it to store
  changing values.  Use a separate environment instead: there are
  examples in package 'grDevices' for example."
- "The preferred location for vignette sources is now directory
  'vignettes' and not 'inst/doc'.  If you want to maintain compatibility
  with R <= 2.13.x for the time being, do at least make use of a
  .Rinstignore file to avoid installing anything other than the vignette
  .Rnw (etc) and .pdf files, plus any other files needed for end-users
  to run the vignette code.
  If you know a priori that the vignettes cannot be re-made on CRAN
  (e.g. because you use unusual LaTeX files), set the BuildVignettes
  field in the DESCRIPTION file to a false value.  (The R code in the
  vignettes as extracted by Stangle still needs to be runnable.)"
- Check for missing suggested packages (JavaGD, graph) 
  and ask on startup whether they should be installed and name the features that are otherwise missing.
- Give feedback for old objects and missing graph package in GUI
- Remove warnings: es gibt kein Paket names 'graph'
- Some edge labels like for parallel gatekeeping are set to small values (0?)
- On Windows: Autoresize of the adjacency matrix does often not work.
- "Reject and pass \alpha" does not make sense in the parametric case (actually it does, if we 
- Option "Show fractions" has no influence on TextFields for weights etc
- What happens if we start the GUI a second time?
I have no idea which 1/2*alpha I'm referring here to: 
- Why does matrix(c(0,1/2,0,0),2) loose half an alpha?
- Flag 1+epsilon>1 in line sum
- round adjusted p-Values up
- Think about "-Xrs" - see paragraph below.
- somehow p-value labels where disabled (but we were not in testing modus).
- Labels like 1/3+1/2*e also in decimal format: 0.3333+0.5*e
- Variable node weights
- When not using JLaTeXMath graphs with variables are not shown and saved(?) correctly
- useC produces "Final graph after 1 steps:" - simple count the number of rejected hypotheses
- think about naming of rows, cols, weights … but I guess it'll be the advise to use just the mutator methods or if you want to avoid this overhead a warning that you should know what you are doing…
- does something in Björns C code trigger the following false-positive:
Possible MalWare 'W32/NewMalware-Generic-8d27-f554' found in '5832765_287X_AZ-D_PA3__gMCP.dll'. Heuristics score: 336 
- More fairness regarding the Maurer et al. example ("improved" - what does the paper cover)
- All Dialogs should have cancel / ok buttons
- Capture verbose output

Medium priority:
================
- graphAnalysis throws: negative values not allowed in adjacency matrix for e.g. improved parallel gatekeeping.
- https://twitter.com/#!/hadleywickham: "@revodavid noooooooooooo. don't use strings + parse + eval. use calls + substitute + eval #rstats (there's also an R news article on macros)"
- Does Indefinite ProgressPanel slow the calculation significantly down ?!?
- graphAnalysis: Graph can be optimal despite the fact that some nodes are not accessible from others
- Warn user when sum of edge weights is bigger than 1
- Check mutator methods for errors (alpha > 1, edge weights > 1)
- Guide for usage under MacOS
- Test the option for rounding how many digits we want to see.
(search for DecimalFormat and replace it with getDecFormat())
- Improve speed when loading graphs
- Check for / think about conflicts: "JAVAGD_CLASS_NAME"="org/mutoss/gui/JavaGD"

Lade nötiges Paket: graph
Warnmeldung:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  es gibt kein Paket namens ‘graph’


Additional features / low priority:
===================================
- Giving \d to RJava causes a segmentation fault.
- \gamma or \delta are pretty small on edges.
- Save ConfIntPlot as png/bmp or copy to system clip board
- Do we really need PolynomF as dependencies?
- Don't create global variable like .tmpGraph etc.
- Report generation in GUI (and respect the option whether to show rejected null hypothesis)
- TikZ styles for rejected / rejectable nodes
- further tests
- Look at http://xmlgraphics.apache.org/fop/
- After interruption of a calculation a new calculation gave:
  "unprotect(): only 0 protected items"
  Should be fixed now - but if we have time to spare, we could look further into this.
- Use of InfoNode Docking Windows? http://www.infonode.net/index.html?idw
  Would increase size by 717 kByte (and bind us to GPL=2)
- Whishlist dialog.
- suppressPackageStartupMessages

     ‘.First.lib’ is called when a package without a name space is
     attached by ‘library’.  (For packages with name spaces see
     ‘.onLoad’.)  It is called with two arguments, the name of the
     library directory where the package was found (i.e., the
     corresponding element of ‘lib.loc’), and the name of the package.
     It is a good place to put calls to ‘library.dynam’ which are
     needed when loading a package into this function (don't call
     ‘library.dynam’ directly, as this will not work if the package is
     not installed in a standard location).  ‘.First.lib’ is invoked
     after the search path interrogated by ‘search()’ has been updated,
     so ‘as.environment(match("package:name", search()))’ will return
     the environment in which the package is stored.  If calling
     ‘.First.lib’ gives an error the loading of the package is
     abandoned, and the package will be unavailable.  Similarly, if the
     option ‘".First.lib"’ has a list element with the package's name,
     this element is called in the same manner as ‘.First.lib’ when the
     package is attached.  This mechanism allows the user to set
     package ‘load hooks’ in addition to startup code as provided by
     the package maintainers, but ‘setHook’ is preferred.

For the conventions for files NEWS and ChangeLog in the GNU project see http://www.gnu.org/prep/standards/standards.html#Documentation. 

@Apple - is this a problem?

r-patched-macosx-ix86:
checking R code for possible problems ... NOTE
2010-10-02 03:00:01.838 R[97724:613] Apple AWT Java VM was loaded on first thread -- can't start AWT. 

-> reference to JGR or Deducer.

rJava: We had the following problem:

> library(rJava)
> .jinit()
> replicate(1000000,rnorm(1))
^C
Java requested System.exit(130), closing R.

We solved it by calling .jinit(parameters="-Xrs")

Does this have side effects?

From http://download.oracle.com/javase/1.3/docs/tooldocs/solaris/java.html :

-Xrs
    Reduces use of operating-system signals by the Java virtual machine (JVM). This option is available beginning with J2SE 1.3.1.
    In J2SE 1.3.0, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly.
    Sun's JVM catches signals to implement shutdown hooks for abnormal JVM termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks.
    The JVM uses a similar mechanism to implement the pre-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses SIGQUIT to perform thread dumps.
    Applications embedding the JVM frequently need to trap signals like SIGINT or SIGTERM, which can lead to interference with the JVM's own signal handlers. To address this issue, the -Xrs command-line option has been added beginning in J2SE 1.3.1. When -Xrs is used on Sun's JVM, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed.
    There are two consequences of specifying -Xrs:
        * SIGQUIT thread dumps are not available.
        * User code is responsible for causing shutdown hooks to run, for example by calling System.exit() when the JVM is to be terminated. 

---

Note for building gMCP for older R versions:
============================================

Prof Brian Ripley: - if your LaTeX installation gets updated and you do not want to update 
R, you can update just Rd.sty from 
https://svn.r-project.org/R/trunk/share/texmf/tex/latex/Rd.sty .  Or you 
could write a file inconsolata.sty as a wrapper for zi4.sty and put it 
in your TEXINPUTS path. [http://r.789695.n4.nabble.com/inconsolata-sty-is-liable-to-disappear-texinfo-5-1-td4669976.html]

As always:
==========
- more references, since some people will actually look at this package.
- More details in manual pages.

Sometimes install.packages fails on Windows machines (one session - second attempt works):

install.packages("gMCP")
--- Please select a CRAN mirror for use in this session ---
also installing the dependencies ‘mvtnorm’, ‘rJava’, ‘PolynomF’, ‘multcomp’, ‘graph’, ‘gtools’

[...]

trying URL 'http://ftp5.gwdg.de/pub/misc/cran/bin/windows/contrib/2.13/gMCP_0.6-1.zip'
Content type 'application/zip' length 4668375 bytes (4.5 Mb)
opened URL
downloaded 4.5 Mb

package 'mvtnorm' successfully unpacked and MD5 sums checked
package 'PolynomF' successfully unpacked and MD5 sums checked
package 'multcomp' successfully unpacked and MD5 sums checked
package 'graph' successfully unpacked and MD5 sums checked
package 'gtools' successfully unpacked and MD5 sums checked
package 'gMCP' successfully unpacked and MD5 sums checked
Warning: unable to move temporary installation 'C:\Program Files\R\R-2.13.0\library\file4a063a\gMCP' to 'C:\Program Files\R\R-2.13.0\library\gMCP'

The downloaded packages are in
        C:\Documents and Settings\Student\Local Settings\Temp\RtmpBJn6oK\downloaded_packages

---
        
The current api for setting a popupMenu in Swing is

  myComponent.setComponentPopupMenu(myPopupMenu)

this way it will be shown automagically, both for mouse and keyboard triggers (the latter depends on LAF). Plus, it supports re-using the same popup across a container's children. To enable that feature:

  myChild.setInheritsPopupMenu(true)

---
        
Is this correct from R check?
  Mismatches in argument default values:
    Name: 'w' Code: "\\nu" Docs: "\nu"

---

Trick to open PDF files from R:
 filepath <- system.file("xy.pdf", package = "yz")
 obj <- list(file = NULL, pdf = filepath, topic = NULL)
 class(obj) <- "vignette"
 print(obj)
 
 ---
 Everything looks fine in CI dialog but:
 
 > Exception in thread "SwingWorker-pool-1260566389-thread-1" java.lang.NoSuchMethodError: gdFlush
	at org.rosuda.JRI.Rengine.rniEval(Native Method)
	at org.rosuda.REngine.JRI.JRIEngine.eval(JRIEngine.java:281)
	at org.rosuda.REngine.REngine.parseAndEval(REngine.java:102)
	at org.af.jhlir.backends.rengine.RCallServicesREngine.engineEval(RCallServicesREngine.java:92)
	at org.af.jhlir.backends.rengine.RCallServicesREngine.eval(RCallServicesREngine.java:70)
	at org.af.gMCP.gui.dialogs.DialogConfIntEstVar.calculateCI(DialogConfIntEstVar.java:190)
	at org.af.gMCP.gui.dialogs.DialogConfIntEstVar.getCIPanel(DialogConfIntEstVar.java:130)
	at org.af.gMCP.gui.dialogs.DialogConfIntEstVar.<init>(DialogConfIntEstVar.java:88)
	at org.af.gMCP.gui.graph.GraphView$1.doInBackground(GraphView.java:236)
	at org.af.gMCP.gui.graph.GraphView$1.doInBackground(GraphView.java:1)
	at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
 
---
Look at highr and
<<tikz-ex, engine = "tikz", fig.cap = "Funky tikz", fig.ext = 'png', cache=TRUE>>=
\usetikzlibrary{arrows}
\begin{tikzpicture}[node distance=2cm, auto,>=latex', thick, scale = 0.5]
\node (P) {$P$};
\node (B) [right of=P] {$B$};
\node (A) [below of=P] {$A$};
\node (C) [below of=B] {$C$};
\node (P1) [node distance=1.4cm, left of=P, above of=P] {$\hat{P}$};
\draw[->] (P) to node {$f$} (B);
\draw[->] (P) to node [swap] {$g$} (A);
\draw[->] (A) to node [swap] {$f$} (C);
\draw[->] (B) to node {$g$} (C);
\draw[->, bend right] (P1) to node [swap] {$\hat{g}$} (A);
\draw[->, bend left] (P1) to node {$\hat{f}$} (B);
\draw[->, dashed] (P1) to node {$k$} (P);
\end{tikzpicture}
@

Bug in Roxygen. Roxygenize inserted documentation at a total wrong place (_in_ another function in another file): 

#' @export subgraph
	subgraph <- graph@subgraphs[[k]]