Learn R Programming

rphast (version 1.0)

write.tm: Wrting Tree Models

Description

Write a tree model to a file (or to the terminal)

Usage

write.tm(tm, filename=NULL, append=FALSE)

Arguments

tm
An object of class "tm"
filename
The filename to write to (use NULL for output to terminal)
append
Whether to append the tree to the end of the file (if FALSE, overwrites file). Not used if filename is NULL

See Also

tm

Examples

Run this code
exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
filename <- "rev.mod"
unzip(exampleArchive, filename)
tm <- read.tm(filename)
tm
write.tm(tm, NULL)
write.tm(tm, "test.mod")
unlink(c(filename, "test.mod"))

Run the code above in your browser using DataLab