| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: RE: Outsheet using a nonstandard delimiter
Julian
The easiest solution to your problem is to use the -filefilter- command to
change the tab delimiter of the .out file to |. For example,
. clear
. sysuse auto, clear
(1978 Automobile Data)
. keep in 1/10
(64 observations deleted)
. outsheet using junk, replace
(note: file junk.out not found)
. filefilter junk.out new_junk.out, from(\t) to("|") replace
. type new_junk.out
make|price|mpg|rep78|headroom|trunk|weight|length|turn|displacement|gear_ratio|for
eign
"AMC Concord"|4099|22|3|2.5|11|2930|186|40|121|3.58|"Domestic"
"AMC Pacer"|4749|17|3|3.0|11|3350|173|40|258|2.53|"Domestic"
"AMC Spirit"|3799|22||3.0|12|2640|168|35|121|3.08|"Domestic"
"Buick Century"|4816|20|3|4.5|16|3250|196|40|196|2.93|"Domestic"
"Buick Electra"|7827|15|4|4.0|20|4080|222|43|350|2.41|"Domestic"
"Buick LeSabre"|5788|18|3|4.0|21|3670|218|43|231|2.73|"Domestic"
"Buick Opel"|4453|26||3.0|10|2230|170|34|304|2.87|"Domestic"
"Buick Regal"|5189|20|3|2.0|16|3280|200|42|196|2.93|"Domestic"
"Buick Riviera"|10372|16|3|3.5|17|3880|207|43|231|2.93|"Domestic"
"Buick Skylark"|4082|19|3|3.5|13|3400|200|42|231|3.08|"Domestic"
You can also write a program using the -file- command to export your data.
I will put a request in to our developers to have a -delimiter()- option
added to -outsheet- for a future release of Stata.
Kevin Crow
StataCorp
----- Original Message -----
From: "Newson, Roger B" <[email protected]>
To: <[email protected]>
Sent: Wednesday, November 08, 2006 12:54 PM
Subject: st: RE: Outsheet using a nonstandard delimiter
You could probably use the -listtex- package, downloadable from SSC
using the -ssc- command, to do this. However, you would have to insert
any variable names manually, using the -headlines()- option.
I hope this helps.
Roger
Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
www.imperial.ac.uk/nhli/r.newson/
Opinions expressed are those of the author, not of the institution.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Julian Reif
Sent: 08 November 2006 18:23
To: Statalist (E-mail)
Subject: st: Outsheet using a nonstandard delimiter
Is there a way to outsheet data using a delimiter that is not a tab or a
comma? I have a situation where data need to be outsheeted using a |
("pipe") delimiter. Before rewriting outsheet, I'd like to make sure
somebody hasn't done this already. Thanks.
Julian Reif
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/