How to load stata and csv datasets in perl?
I use R for data analysis. The power of perl is fascinating and I would ike to know if I can load the stata and csv datasets in perl and analyse them.
I have 64 bit 5.18.2 strawberry perl installed in my machine.
Any help.
Eagerly waiting.
Thanks in advance..
You can use this library to read stata: http://search.cpan.org/~reckon/Parse-Stata-DtaReader-0.681/lib/Parse/Stata/DtaReader.pm
You can use this library to read CSV: http://search.cpan.org/~hmbrand/Text-CSV_XS-1.04/CSV_XS.pm
usually, Perl is better at the cleaning stage, and R do the analysis. the power of Perl in data cleansing, before they goes in to CSV.
you may get more and quicker feedback if you asking in beginning perl mailing list.
sorry for the grammar errors. I can not edit my reply.
Have you tried PDL? http://pdl.perl.org
Thank you,
I have basic knowledge of perl. But I am stuck to load data.
Would you please guide me a step by step approach with examples.
Tons of thanks
I could check the number of variables and observations with Parse::Stata::DtaReader.
But I am having problem in viewing variables, their types. How can I view whole data in tabular format??
Thanks
To Joel,
Thanks for the response.
I don't know how to load data in pdl.
Could you please iluminate on that please?
Thanks