Bookmark and Share

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]

st: RE: Infile several ASCII files


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: Infile several ASCII files
Date   Wed, 31 Mar 2010 21:07:00 +0200

<>

*******
clear*
infile var1 var2 using Book1.txt
gen str10 dataset="Book1"
tempfile temp
save `temp', replace

drop _all
infile var1 var2 using Book2.txt
gen str10 dataset="Book2"
append using `temp'

sort dataset
l, noo sepby(dataset )
*******


HTH
Martin


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Andrzej Niemierko
Sent: Mittwoch, 31. März 2010 20:54
To: Stata
Subject: st: Infile several ASCII files

I have a data management problem. My data are stored in several ASCII (.txt)
files. Each file has the same number of observations (in the same order). I
can -infile- each file individually, but I would like to -infile- all of
them and combine them into a one dataset. I cannot figure out how to do it
as -infile- refuses to work if data are already in memory. I suspect that
someone has already faced that problem and knows the solution. Any ideas?
Andrzej




The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

*
*   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/


*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index