Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE : st: Outsheet file to "txt" file


From   "Nicolas Couderc" <Nicolas.Couderc@univ-paris1.fr>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE : st: Outsheet file to "txt" file
Date   Thu, 24 Aug 2006 11:39:02 +0200

Joseph,

With my Stata, your code works perfectly... and much more efficently than
mine. Except a weird thing : the columns are only 10 char wide. I've to
change -format _all %-8s- into -format _all %-9s- to have eleven chars wide
columns. 

Does the -outfile- command changes its behaviour with platforms/systems... ?
Mine is Stata 9.2 (update 07-31-06), win xp pro.

Best,
N
-------
Nicolas Couderc

Centre d’Economie de la Sorbonne, TEAM & CNRS
Maison des Sciences Economiques,
Université Paris 1 - Panthéon-Sorbonne
106-112, boulevard de l'Hôpital 
F-75647, Paris, Cedex 13
Email : couderc@univ-paris1.fr
Page web : http://team.univ-paris1.fr/teamperso/couderc/index.htm


-----Message d'origine-----
De : owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] De la part de Joseph Coveney
Envoyé : jeudi 24 août 2006 11:31
À : Statalist
Objet : Re: st: Outsheet file to "txt" file


I'd forgotten that -tostring- can take a variable list.  The -foreach- loop 
is not needed.  You can do what you want more simply:

tostring _all, replace
format _all %-8s
outfile using Eleven-wide.prn, wide noquote

Joseph Coveney


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

-- 
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.


-- 
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.


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



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index