Learn R Programming

RJafroc (version 1.0.1)

UtilOutputReport: Generate a formatted report file

Description

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

Usage

UtilOutputReport (fileName, format = "JAFROC", delimiter = ",", dataset, 
   dataDescription = deparse(substitute(dataset)), reportFile, reportFormat = "txt",
   method = "DBMH", FOM = "wJAFROC", alpha = 0.05, covEstMethod = "Jackknife", 
   nBoots = 200, renumber = FALSE, showWarnings = TRUE)

Arguments

fileName

A string variable containing the name of the data file to be analyzed, see DfReadDataFile and "Details".

format

The format of the data specified in fileName: see DfReadDataFile and "Details".

delimiter
dataset

The dataset to be analyzed, RJafroc-package.

dataDescription

Only needed if a dataset is not specified. It is a string descriptor of the dataset; the default is the variable name of dataset

reportFile

The file name of the output report file. If this parameter is missing, the function will use fileName or dataDescription followed by the underscore separated concatenation of method and FOM as the output report file.

reportFormat

The format of the output report. The two available formats are "txt" and "xlsx", which correspond to a formatted text file and an Excel file respectively. "txt" is the default.

method

The analysis method: "ORH" or "DBMH".

covEstMethod
renumber

A logical variable: if TRUE, consecutive integers (staring from 1) will be used as the modality and reader IDs in the output report. Otherwise, modality and reader IDs in the original data file will be used. This option may be needed for aesthetics.

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 dataDescription must be specified. If both are specified, the data file fileName is analyzed and the dataset dataset is ignored.

Examples

Run this code
# NOT RUN {
UtilOutputReport(dataset = includedRocData, method = "DBMH", FOM = "Wilcoxon", 
             dataDescription = "MyROCData", showWarnings = FALSE)

## Generate a analysis report for a data file.
fileName <- system.file("extdata", "includedRocData.xlsx", 
package = "RJafroc", mustWork = TRUE)
UtilOutputReport(fileName = fileName, method = "DBMH", FOM = "Wilcoxon",
             showWarnings = FALSE)
             
## Output report for an existing dataset
UtilOutputReport(dataset = includedRocData, method = "DBMH", FOM = "Wilcoxon", 
             reportFile = "MyROCDataAnalysis.txt") 
UtilOutputReport(dataset = includedRocData, method = "ORH", FOM = "Wilcoxon", showWarnings = FALSE)
## UtilOutputReport(dataset = dataset05, 
## method = "DBMH", FOM = "Wilcoxon") # ERROR!
UtilOutputReport(dataset = dataset05, method = "ORH") # default FOM is wJAFROC
UtilOutputReport(dataset = dataset05, method = "DBMH", FOM = "HrAuc")
# }
# NOT RUN {
       
# }

Run the code above in your browser using DataLab