-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Description
When creating a TSV such as participants.tsv, it is easy for users to leave a few empty cells at the end of a row. This creates problems for xASL_tsvRead->spm_load, which wants the same number of elements for each row. Now I programmed a script to fix this, assuming that the columns in the header are correct.
Tasks
-
spm_load: Automatic fixing empty CSV/TSV cells -
README_SPM.txt: Addspm_loadedit -
- I can report a list of lines with too few/too much delimiters
-
I will shorten/fill with empty accordingly
-
if no end of lines are in the data, then we revert to a simple total check - anything else is just guessing
-
I will save repaired.
-
I will only cut/add fields, but not lines.
-
@jan-petr This still goes wrong: when loading a line that has sufficient number of delimiters to get to the correct number of cells per line;
textscanon line 194 still only reads 8 (so it somehow ignores the last "empty cell"). We could ignore this, but then it is annoying for the user that theparticipants.tsv, even when "fixed" byxASL_tsvRead->spm_load, will keep repeating a warning.
-> In the first screenshot, the selection contains two tabs at the end of line two; leading to 9 "cells" and a correct line length. However, in the second screenshot, one sees that textscan has loaded only 8 "cells"; somehow ignoring the last \t.
Release notes
Handles an incorrect number of delimiters per line in TSV/CSV/DSV files loaded by spm_load.

