Df2RJafrocDataset {RJafroc} | R Documentation |
Convert ratings arrays to an RJafroc dataset
Description
Converts ratings arrays, ROC or FROC, but not LROC, to an RJafroc dataset, thereby allowing the user to leverage the file I/O, plotting and analyses capabilities of RJafroc.
Usage
Df2RJafrocDataset(NL, LL, InputIsCountsTable = FALSE, ...)
Arguments
NL |
Non-lesion localizations array (or FP array for ROC data). |
LL |
Lesion localizations array (or TP array for ROC data). |
InputIsCountsTable |
If |
... |
Other elements of RJafroc dataset that may, depending on the
context, need to be specified. |
Details
The function "senses" the data type (ROC or FROC) from the the absence
or presence of perCase
.
ROC data can be
NL[1:K1]
andLL[1:K2]
orNL[1:I,1:J,1:K1]
andLL[1:I,1:J,1:K2]
.FROC data can be
NL[1:K1,1:maxNL]
andLL[1:K2, 1:maxLL]
orNL[1:I,1:J,1:K1,1:maxNL]
andLL[1:I,1:J,1:K2,1:maxLL]
.
Here maxNL/maxLL
= maximum numbers of NLs/LLs, per case, over entire dataset.
Equal weights are assigned to every lesion (FROC data).
Consecutive characters/integers starting with "1" are assigned to IDs
, modalityID
and readerID
.
Value
A dataset with the structure described in RJafroc-package
.
Examples
## Input as ratings arrays
set.seed(1);NL <- rnorm(5);LL <- rnorm(7)*1.5 + 2
dataset <- Df2RJafrocDataset(NL, LL)
## Input as counts tables
K1t <- c(30, 19, 8, 2, 1)
K2t <- c(5, 6, 5, 12, 22)
dataset <- Df2RJafrocDataset(K1t, K2t, InputIsCountsTable = TRUE)