View source: R/jpinfect_read_confirmed.R
| jpinfect_read_confirmed | R Documentation |
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.
jpinfect_read_confirmed(path, type = NULL, ..., skip_size_check = FALSE)
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. |
skip_size_check |
A logical value indicating whether to skip the file size check. Defaults to |
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".
A data frame containing processed case reports for all rows and columns in the files.
# Process a single file
data_file <- system.file("extdata", "1999_Syu_11.xls", package = "jpinfect")
data_single <- jpinfect_read_confirmed(data_file, skip_size_check = TRUE)
# Process all files in a directory
data_dir <- system.file("extdata", package = "jpinfect")
data_multiple <- jpinfect_read_confirmed(data_dir, type = "place", skip_size_check = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.