tda_strings returns the string variables a run printed with
pdata, as a named list of character vectors.
Arguments
- res
a run, as returned by
tda_run.- trim
trim the fixed-width padding (default
TRUE).
Value
A named list of character vectors, one per string variable, or an empty list if the run printed none.
Details
TDA stores strings fixed-width, so every value is padded to the variable's declared length; the padding is trimmed here, since it is storage rather than data. The values come through the export channel rather than being re-read from the printed file: a string cannot travel on the numeric channel, and parsing it back out of fixed-width text is exactly what the exports exist to avoid.
A character or factor column in a data frame becomes a TDA string
variable (see tda_write_data), and rspss and
rstata create them from the file's string columns. Those
are the only ways TDA makes one.
See also
Other data:
tda_read_spss(),
tda_read_xls()