Last data update: 2014.03.03

R: Reads the data file and creates a dataset object
ReadDataFileR Documentation

Reads the data file and creates a dataset object

Description

Reads the dataset file to be analyzed and creates a dataset object for subsequent analysis.

Usage

ReadDataFile(fileName, format = "JAFROC", delimiter = ",")

Arguments

fileName

A string specifying the name of the file that contains the dataset. The extension of the file must match the corresponding format specified below.

format

A string specifying the format of the data file. It can be "JAFROC" (the default), "MRMC" or "iMRMC". For "MRMC" the format is determined by the extension of the data file as specified in http://perception.radiology.uiowa.edu/: the file extension can be .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.

Value

A dataset with the specified structure, see RJafroc-package.

Examples

fileName <- system.file("tests", "rocData.xlsx", package = "RJafroc")
RocDataXlsx<- ReadDataFile(fileName)

## Not run: 
fileName <- system.file("tests", "rocData.csv", package = "RJafroc")
RocDataCsv<- ReadDataFile(fileName, format = "MRMC")

fileName <- system.file("tests", "rocData.imrmc", package = "RJafroc")
RocDataImrmc<- ReadDataFile(fileName, format = "iMRMC")

fileName <- system.file("tests", "frocData.xlsx", package = "RJafroc")
FrocDataXlsx <- ReadDataFile(fileName)

fileName <- system.file("tests", "roiData.xlsx", package = "RJafroc")
RoiDataXlsx <- ReadDataFile(fileName)

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RJafroc)
Loading required package: tools
Loading required package: xlsx
Loading required package: rJava
Loading required package: xlsxjars
Loading required package: ggplot2
Loading required package: stringr
Loading required package: shiny
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RJafroc/ReadDataFile.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ReadDataFile
> ### Title: Reads the data file and creates a dataset object
> ### Aliases: ReadDataFile
> 
> ### ** Examples
> 
> fileName <- system.file("tests", "rocData.xlsx", package = "RJafroc")
> RocDataXlsx<- ReadDataFile(fileName)
> 
> ## Not run: 
> ##D fileName <- system.file("tests", "rocData.csv", package = "RJafroc")
> ##D RocDataCsv<- ReadDataFile(fileName, format = "MRMC")
> ##D 
> ##D fileName <- system.file("tests", "rocData.imrmc", package = "RJafroc")
> ##D RocDataImrmc<- ReadDataFile(fileName, format = "iMRMC")
> ##D 
> ##D fileName <- system.file("tests", "frocData.xlsx", package = "RJafroc")
> ##D FrocDataXlsx <- ReadDataFile(fileName)
> ##D 
> ##D fileName <- system.file("tests", "roiData.xlsx", package = "RJafroc")
> ##D RoiDataXlsx <- ReadDataFile(fileName)
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>