How to open a file in WSV format?

I have a WSV (whitespace separated value) file, but between each column I have a variable number of spaces, and not all lines have the same number of columns.

read.table() using sep="", sep=" " or sep="\t" does not manage this task.

Can anyone give me some light?

Hi @Leandro_Cardoso_Bell
Welcome to the Community Forum.

Try adding fill=TRUE to automatically add the missing values in the shorter rows.

If that doesn't work you'll probably need to post a sample of the data so we can see what is needed.

1 Like

Make sure to adjust the column_widths according to your actual file structure. If the number of columns varies between lines, you might need to analyze your data beforehand to determine the maximum number of columns and their widths.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.