compilefits: Save a pdf image of each regression tree grown in the...

Description Usage Arguments Details Examples

View source: R/compilefits.R

Description

For each element of save parameters, look at the tree and produces the corresponding pdf. It also removes all the information that is stored in the ouptut of parykit::Ctree, e.g. the data. It only keeps the tree and the rules to get it.

Usage

1
2
3
4
5
6
compilefits(
  Sparameters,
  fitmodelsavepath,
  pdfpath = fitmodelsavepath,
  .progress = "text"
)

Arguments

pdfpath

where to save the pdfs

Sparameters:

a list, that has the same structure than the outputs of

fitmodelsavepath:

a file path where to store the pdf of the plot

.progress:

a string, name of the progress bar to use, see plyr::create_progress_bar

Details

Depends on plyr. Partykit output contain all the data that was used to grow the tree. This function removes the unwanted information.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(TtableA,package="BigSyn")
Sparameters<-Sparameters.default.f(ref.table=TtableA,asis=c("id1a","id1b"))
STtableA1<-BigSyn::SDPSYN2(TtableA,asis=c("id1a","id1b"),
                           Sparameters=Sparameters,fitmodelsavepath = tempdir())[[1]]
pdfpath=file.path(tempdir(),"pdf")
fitmodelsavepath=tempdir()
dir.create(file.path)
 Compilefits<-compilefits(Sparameters,
 fitmodelsavepath=tempdir(),
 pdfpath=file.path(tempdir(),"pdf"))
 

DanielBonnery/BigSyn documentation built on June 28, 2020, 7:18 p.m.