Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Problem when importing a file
From
Muhammad Anees <[email protected]>
To
[email protected]
Subject
Re: st: Problem when importing a file
Date
Thu, 22 Dec 2011 10:40:22 +0500
Check if material in
http://www.statmethods.net/input/exportingdata.html is of any help.
On Thu, Dec 22, 2011 at 3:27 AM, Shubhabrata Mukherjee
<[email protected]> wrote:
>
> Hi,
>
> I am trying to import a text file (created in R) into Stata and having problems with it. Can someone tell me a way to solve this:
>
> The text file looks like the following:
>
> V1 V2 A3 A4
>
> 1 0.015 0.986 0.010 0.001
> 2 0.085 0.975 0.000 0.002
> 3 0.095 0.900 0.010 0.001
> .........
> ......
> ...
>
> I used the command insheet using chunk1.txt, delim(" ")
>
> Two problem occur
>
> 1) Somehow I need to delete the the numbers in the first column from the second row onwards (1, 2, 3...) as they are not part of the dataset but was created by the text file as placeholders for each row.
>
> 2) At the end there are two variables created ('v110' and 'v111') where v110 contains the values which should be under A4 and 'v111' gets created because of some end of line issues.
>
> How can I fix these?
>
> Thanks,
>
> -Joey
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
--
Best
---------------------------
Muhammad Anees
Assistant Professor/Programme Coordinator
COMSATS Institute of Information Technology
Attock 43600, Pakistan
http://www.aneconomist.com
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/