jpinfect_read_confirmed {jpinfect} | R Documentation |
Read Confirmed Case Reports from File or Directory
Description
This function processes case reports either from a single file or from multiple files within a directory.
The function is capable of handling data by "sex"
or "place"
types, and processes data
accordingly based on file patterns.
Usage
jpinfect_read_confirmed(path, type = NULL, ...)
Arguments
path |
A character string specifying the path to a single file or directory containing multiple files. |
type |
A character string specifying the type of data to import. Must be either |
... |
Additional arguments passed to internal functions for further customization. |
Details
The function detects whether the path
is a single file or a directory. If it is a single file,
it processes the data using .jpinfect_read_excel
. If it is a directory, it processes multiple files
using .jpinfect_read_excels
.
Supported file patterns:
"sex"
Files with names containing
"11.xls"
or"Syu_01_1.xls"
."place"
Files with names containing
"Syu_02_1.xls"
.
Value
A data frame containing processed case reports for all rows and columns in the files.
Examples
# Process a single file
data <- jpinfect_read_confirmed("path/to/file.xls")
# Process all files in a directory
data <- jpinfect_read_confirmed("path/to/directory", type = "place")