[58c332]: / RadETL / R / imageTotalCount_OccurrenceTable.R

Download this file

23 lines (20 with data), 686 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#' 'imageTotalCount'
#'
#' imageTotalCount function indicates total count of each DICOM files in each occurrences
#'
#'
#' @param DICOMList you can put it like this and then run the function : DICOMList<-DICOMHeaderList(DICOMFolderPath)
#' @import dplyr
#' @importFrom magrittr "%>%"
#'
#'
#' @return A dataframe indicating total count of each DICOM files in each occurrences
#' @examples
#' DICOMList<-DICOMHeaderList(DICOMFolderPath)
#' imageTotalCount(DICOMList)
#' @export
#imageTotalCount
imageTotalCount<-function(DICOMList){
imageTotalCount<-radiologyOccurrenceId(DICOMList) %>% group_by(radiologyOccurrenceId) %>% count(imageTotalCount=n())
imageTotalCount[,c(1:2)]
}