Learn R Programming

RJafroc (version 1.0.1)

DfReadDataFile: Read a data file

Description

Read a disk file and create a dataset object from it.

Usage

DfReadDataFile(fileName, format = "JAFROC", 
   delimiter = ",", renumber = FALSE)

Arguments

fileName

A string specifying the name of the file. The file-extension must match the format specified below

format

A string specifying the format of the data in the file. It can be "JAFROC" (the default), "MRMC" or "iMRMC". For "MRMC" the format is determined by the data file extension as specified in http://perception.radiology.uiowa.edu/, i.e., .csv or .txt or .lrc. For file extension .imrmc the format is described in https://code.google.com/p/imrmc/.

delimiter

The string delimiter to be used for the "MRMC" format ("," is the default), see http://perception.radiology.uiowa.edu/. This parameter is not used when reading "JAFROC" or "iMRMC" data files.

renumber

A logical variable: if TRUE, consecutive integers (starting from 1) will be used as the modality and reader IDs. Otherwise, modality and reader IDs in the original data file will be used.

Value

A dataset with the structure specified in RJafroc-package.

Examples

Run this code
# NOT RUN {
fileName <- system.file("extdata", "includedRocData.xlsx", 
package = "RJafroc", mustWork = TRUE)
RocDataXlsx <- DfReadDataFile(fileName)

# }
# NOT RUN {
fileName <- system.file("extdata", "includedRocData.csv", 
package = "RJafroc", mustWork = TRUE)
RocDataCsv<- DfReadDataFile(fileName, format = "MRMC")

fileName <- system.file("extdata", "includedRocData.imrmc", 
package = "RJafroc", mustWork = TRUE)
RocDataImrmc<- DfReadDataFile(fileName, format = "iMRMC")

fileName <- system.file("extdata", "includedFrocData.xlsx", 
package = "RJafroc", mustWork = TRUE)
FrocDataXlsx <- DfReadDataFile(fileName, renumber = TRUE)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab