# \donttest{
if (requireNamespace(c("write_xlsx", "readxl"), quietly = TRUE)) {
tmp_in <- tempfile(fileext = ".xlsx")
tmp_out <- tempfile(fileext = ".xlsx")
# Minimal toy input that includes your required pieces:
# an ID column and something that contains the marker value.
toy <- data.frame(
ID = c(1, 1, 2, 2),
section = c("videoinfo", "videoinfo", "videoinfo", "videoinfo"),
key = c("fps", "duration_s", "fps", "duration_s"),
value = c(30, 12.3, 25, 9.8),
stringsAsFactors = FALSE
)
writexl::write_xlsx(toy, tmp_in)
reshape_data(
input_filepath = tmp_in,
marker = "videoinfo",
id_col = "ID",
output_filepath = tmp_out
)
out <- readxl::read_excel(tmp_out)
print(out)
}
# }
Run the code above in your browser using DataLab