On Wed, Jul 8, 2009 at 2:17 PM, <[email protected]> wrote:
> Hello,
>
> I have a problem with the insheet command. I write: "insheet using
> myfile.txt". I have actually two files: the command works well with the
> first one, but by launchig the command with my second file, Stata
> answers: "cannot determine separator--use tab or comma option". Could you
> give me an idea where the problem comes from?
What does your data in the second file look like?
What character is used to delimit columns? If its a comma then
explicitly specify the the -, comma- option to the end of your
command...
insheet using myfile2.txt, comma
If its something else such as a pipe (i.e. "|") then use the -,
delim("|")- option...
insheet using myfile2.txt, delimc("|")
Both of these are documented in the help page for -insheet- which you
can read on-line in Stata by typing...
man insheet
... and the options are explained within this page.
If neither of those work then you will have to provide and example of
your data for people to help you further.
Neil
--
"The combination of some data and an aching desire for an answer does
not ensure that a reasonable answer can be extracted from a given body
of data." ~ John Tukey (1986), "Sunset salvo". The American
Statistician 40(1).
Email - [email protected]
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
*
* 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/