Trying to import data with first row treated as column headings

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
MossyMcCollie
Posts: 8
Joined: Tue Oct 16, 2018 1:24 pm

Trying to import data with first row treated as column headings

Post by MossyMcCollie » Mon Feb 11, 2019 2:32 pm

I am trying to import a large text file into MLwiN, but using both the Import and the ASCII Text File Input options, the data is imported with the column headings as the first row.

My data files are very large in terms of number of variables (100 or so), and cases (3 million); and although Pasting data in allows an option to identify first row as column headings, I have had difficulties in doing this, possibly due to the size of the files.

Is there an option to specify header rows as names using the Import or ASCII Text File Input options?

Many thanks
John

ChrisCharlton
Posts: 1071
Joined: Mon Oct 19, 2009 10:34 am

Re: Trying to import data with first row treated as column headings

Post by ChrisCharlton » Mon Feb 11, 2019 3:07 pm

You are unfortunately correct that currently the text-file input methods within MLwiN do not have the ability to use the first row of data for the column headings. I will investigate the feasibility of adding this an an option in a later version, but in the mean time I would suggest that you save your data in another supported format (e.g. .dta or .sav) if you have access to software that is able to create them. The alternative would be to convert the file into an MLwiN macro that uses the NAME and ASSIgn commands (which is essentially what paste does), however given the number of variables in your data this may prove cumbersome.

MossyMcCollie
Posts: 8
Joined: Tue Oct 16, 2018 1:24 pm

Re: Trying to import data with first row treated as column headings

Post by MossyMcCollie » Mon Feb 11, 2019 3:47 pm

Thanks Chris - I'm glad I was not missing something obvious anyway!

Post Reply