Nothing
#' Convert Tiered Assessment Excel File
#'
#' Reads an Excel file containing binary tier responses,
#' validates the data, converts the responses into item scores,
#' and optionally writes the result to a new Excel file.
#'
#' @param input Path to the input Excel file.
#' @param output Path to the output Excel file. If NULL, the
#' result is returned without writing a file.
#' @param rules A named numeric vector containing scoring rules.
#' @param n_tier Number of tiers in each item.
#'
#' @return A data frame containing the converted item scores.
#'
#' @importFrom readxl read_excel
#' @importFrom writexl write_xlsx
#'
#' @export
convert_file <- function(
input,
output = NULL,
rules,
n_tier
) {
if (!file.exists(input)) {
stop(
"File input tidak ditemukan: ",
input
)
}
data <- readxl::read_excel(input)
data <- as.data.frame(data)
validate_data(
data = data,
n_tier = n_tier
)
result <- convert_tier(
data = data,
rules = rules,
n_tier = n_tier
)
if (!is.null(output)) {
writexl::write_xlsx(
result,
path = output
)
}
result
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.