Learn R Programming

DVHmetrics (version 0.4.2)

saveMetric: Save DVH metrics to file

Description

Saves results from getMetric to a text file.

Usage

saveMetric(x, file = "", ...)

# S3 method for data.frame saveMetric(x, file = "", ...)

# S3 method for list saveMetric(x, file = "", ...)

Arguments

x

data.frame or list - the result from getMetric.

file

character. Path to file.

...

Further arguments passed to write.table - e.g., dec="." to define the decimal separator as point or sep="\t" to define the column sepator as tab.

Value

If x is a list, one text file is written for each list component. If x is a data.frame, one file is written.

Details

This is a wrapper for write.table.

See Also

write.table, getMetric

Examples

Run this code
# NOT RUN {
res <- getMetric(dataMZ, c("D1CC", "V10%_CC"),
                 sortBy=c("metric", "structure"),
                 splitBy="patID")
# }
# NOT RUN {
# not run
saveMetric(res, file="metricsResults.txt", sep="\t")
# }

Run the code above in your browser using DataLab