##-*- mode: org -*- Emacs org: use [Tab] “all the time” Priority: Higher-order bullet point “inherits” max. priority of all lower-order bullet points. 1 (top): Do before substantial writing starts 2: Do before submission 3: Do if there is enough time 4 = DONE
(2) What do we export / what not? <–> man/pcalg-internal.Rd
The concept of such “internal” functions really predates the use of NAMESPACEs and is now obsolete.
(2,MK) amat2dag() in ../tests/test_amat2dag.R
(3) Get rid of man/pcalg-internal.Rd entirely.
whereas dag2pag() does return more than just an adj.matrix. Change BEFORE release
–> file:/u/maechler/R/MM/Pkg-ex/pcalg/Borsboom_mail.R is an example where he explicitly calls an other package just to get sensible labeled plots.
e.g. in my.SpecialDag() in R/pcalg.R
- returns the adjacency matrix “@ amat” (among other things),
a simple matrix with entries in {0,1,2,3}.
It would be nice to allow sparse matrices here,
e.g., by using the “Matrix” class from the Matrix package.
This makes sense mostly if it’s realistic to have quite sparse and relatively large sets of variables.
instead of all methods (plot, summary) for both pcAlgo and fciAlgo
instead of lm() twice, use lm.fit once (multivariate regression). This will probably be much faster.
which was hidden in the code previously. Have you ever tried larger/smaller?
- returns a P-value but not the test statistic. Should really return an object of (standard S3 class) “htest” (which contains P-value, test statistic, …). But they have been documented to do what they do, and so we keep them.
and the 10 rules at the very end. Better: verbose in { 0,1,2 (, 3) } and verbose=1 should give much less than TRUE now
e.g., optionally (‘topOrder=FALSE’) in unifDAG(.) and randDAG() to fixup a non-top.ordered input.
see also ‘Adjacency Matrices’ in the “Internal Programming” part below.
2 of pc(), fci(), rfci(), fciPlus()
(2) MK[2013-12-17]: Letztest Bsp in fci(): p-1 statt p im Argument, weil eine (latente) Var gelöscht wurde
- Die data/test_*.rda Daten welche nur in tests/ gebraucht werden, sollen nicht “exponiert” werden.
- Die andern sind momentan “falsch” dokumentiert, sowohl formal (-> R CMD check), als auch inhaltlich {die Namen strings sind “dokumentiert”; sonst kein Inhalt}.
- Auch hat es z.T. mehrere Objekte pro *.rda die inhaltlich zusammengehören; MM denkt, die sollten wohl zusammen in eine Liste (mit kurzem Namen!).
Wo gebraucht:
pcalg$ grep-r binaryData
./man/pc.Rd:data(binaryData)
./man/skeleton.Rd:data(binaryData)
pcalg$ grep-r discreteData
./inst/doc/pcalgDoc.Snw:data set \code{discreteData} (which consists of
## Here, you get their contents:
for(f in list.files(“~/R/Pkgs/pcalg/data/”, full.names=TRUE)) { bf <- basename(f) nam <- sub(“\.rda$”, ”, bf) cat(“\n”, bf, “:\n-----------------\n”, sep=”“) attach(f) print(ls.str(pos=2)) detach() }
- vcd: I’ve eliminated it, and all the ‘R CMD check’ still run
- RBGL: .. ok, only a few needed
- graph: import quite a few; now found all examples – is this (not attaching ‘graph’) acceptable to the current pcalg users ?
- abind: abind() needed in gSquareBin() & *Dis() – once only, each
- corpcor: pseudoinverse() [ -> fast.svd() .. non-optimal “A %% diag(.)” ]
(3) MK[2014-07-08]: Make up some clever way to deal with NAs in the continuous case (phps also in other cases) and prepare test functions for users
for a sparse am of dim 50 x 50 ==> Using the more ugly notation is ok! — But this will most probably change in R >= 3.3.0
file:man/amatType.Rd (symmetric ? / lower- or upper-triangular ?) E.f. file:man/backdoor.Rd has “Coding of adjacency matrix” (0,1,2,3)
e.g. in my.SpecialDag() in R/pcalg.R
as in all practically all “base R” help pages.