Skip to content

Commit

Permalink
Remove head and tail functions
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-gallas committed Aug 9, 2024
1 parent ce0c124 commit 3735f67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ set.seed(1, kind = "L'Ecuyer-CMRG")
dFrame.newH <- sim.NormalIG.Hierarchical(config)
# check the first and last few lines of the simulated dataframe
head(dFrame.newH)
tail(dFrame.newH)
print(dFrame.newH[1:6, ])
print(dFrame.newH[(nrow(dFrame.newH) - 5):nrow(dFrame.newH), ])
```

We simulated 5 readers and 100 cases for 2 modalities, so the total number of scores is 5x100x2=1000.
Expand All @@ -56,8 +57,9 @@ set.seed(1, kind = "L'Ecuyer-CMRG")
dFrame.gRM <- sim.gRoeMetz(config)
# check the first and last few lines of the simulated dataframe
head(dFrame.gRM)
tail(dFrame.gRM)
print(dFrame.gRM[1:6, ])
print(dFrame.gRM[(nrow(dFrame.gRM) - 5):nrow(dFrame.gRM), ])
```

The simulated data starts with truth state of each case, and followed by the reading scores from each of the readers. Since we simulate 50 positive cases and 50 negative cases, there are 100 lines for the truth and 100x5x2 = 1000 lines for the scores from 5 readers for 2 modalities.
Expand All @@ -67,6 +69,7 @@ To combine the truth data and the reader scores and change the data to a datafra
dFrame.gRM.2 <- undoIMRMCdf(dFrame.gRM)
# check the first and last few lines of the simulated dataframe
head(dFrame.gRM.2)
tail(dFrame.gRM.2)
print(dFrame.gRM.2[1:6, ])
print(dFrame.gRM.2[(nrow(dFrame.gRM.2) - 5):nrow(dFrame.gRM.2), ])
```
Binary file not shown.

0 comments on commit 3735f67

Please sign in to comment.