Learn R Programming

RJafroc (version 0.1.1)

OutputReport: Generate a formatted report of the analysis

Description

Generate a formatted report of the analysis and save to a text file.

Usage

OutputReport(fileName, format = "JAFROC", delimiter = ",", dataset, dataDscrpt = deparse(substitute(dataset)), reportFile, method = "DBMH", fom = "wJAFROC", alpha = 0.05, covEstMethod = "Jackknife", nBoots = 200, showWarnings = TRUE)

Arguments

fileName
A string variable containing the name of the data file to be analyzed, see ReadDataFile and "Details".
format
The format of the data specified in fileName: see ReadDataFile and "Details".
delimiter
dataset
The dataset object to be analyzed, see RJafroc-package and "Details".
dataDscrpt
Only needed if a dataset object is specified. It is a string descriptor of the dataset object, the default is the variable name of dataset, see "Details".
reportFile
The file name of the output report file. If this parameter is missing, the function will use fileName or dataDscrpt followed by the underscore separated concatenation of method and fom as the output report file.
method
The analysis method: "ORH" or "DBMH".
fom
alpha
covEstMethod
nBoots
showWarnings
A logical variable: if TRUE, a warning will be issued if the report file already exists and the program will wait until the user inputs "y" or "n" to determine whether to overwrite the existing file. If FALSE, the existing file will be silently overwritten.

Value

A formatted report of the data analysis, patterned roughly on that of OR-DBM MRMC V2.5.

Details

At least one of the combinations of fileName and format or dataset and dataDscrpt must be specified. If both are specified, the data file fileName is analyzed and the dataset object dataset is ignored.

Examples

Run this code
## deliberately overriding the default for showWarnings, so as to not confuse
## timing tests run by CRAN; you should not need to do this
OutputReport(dataset = rocData, method = "DBMH", fom = "Wilcoxon",
             dataDscrpt = "MyROCData", showWarnings = FALSE)

## Not run: 
# ## Generate a analysis report for a data file.
# fileName <- system.file("tests", "rocData.xlsx", package = "RJafroc")
# OutputReport(fileName = fileName, method = "DBMH", fom = "Wilcoxon",
#              showWarnings = FALSE)
# 
# ## Output report for an existing dataset
# OutputReport(dataset = rocData, method = "DBMH", fom = "Wilcoxon",
#              reportFile = "MyROCDataAnalysis.txt", showWarnings = FALSE)
# OutputReport(dataset = rocData, method = "ORH", fom = "Wilcoxon", showWarnings = FALSE)
# OutputReport(dataset = frocData, method = "DBMH", fom = "Wilcoxon") # ERROR!
# OutputReport(dataset = frocData, method = "ORH") # default fom is wJAFROC
# OutputReport(dataset = frocData, method = "DBMH", fom = "HrAuc")
# OutputReport(dataset = roiData, method = "ORH", fom = "ROI")## End(Not run)

Run the code above in your browser using DataLab