saveMetric {DVHmetrics}R Documentation

Save DVH metrics to file

Description

Saves results from getMetric to a text file.

Usage

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

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

## S3 method for class '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.

Details

This is a wrapper for write.table.

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.

See Also

write.table, getMetric

Examples

res <- getMetric(dataMZ, c("D1CC", "V10%_CC"),
                 sortBy=c("metric", "structure"),
                 splitBy="patID")
## Not run: 
# not run
saveMetric(res, file="metricsResults.txt", sep="\t")

## End(Not run)

[Package DVHmetrics version 0.4.2 Index]