Skip to contents

Ties the structure reader (.spv_read_structure(), which table exists, what analysis produced it, which format its data is in) and the two decoders (.spv_decode_light_table() for modern tables, .spv_decode_legacy_data() + .spv_decode_legacy_table() for pre-21 tables) into the SAME shape read_stat_tables() already returns from JASP's analyses.json and jamovi's protobuf blobs.

Usage

import_spv(path)

Arguments

path

path to a .spv file

Value

a list of result tables, each list(analysis, title, data, syntax, table_index) — the same shape read_stat_tables() returns for .jasp/.omv (syntax is .spv-specific: the exact SPSS syntax that produced the table, when recoverable). Empty list if the archive has no structure XML or no tables decode.

Details

A table that fails to decode (an unsupported construct in either format, or real malformation) is skipped rather than aborting the whole file, so one bad table does not lose every other result in the same archive.

Examples

if (FALSE) { # \dontrun{
# needs an SPSS output file (.spv), which only SPSS writes
res <- import_spv("my_analysis.spv")
} # }