Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: file write a long string from an rclass program


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: file write a long string from an rclass program
Date   Mon, 12 Jan 2004 11:48:45 -0000

Sorry, should I think be

"`r(rf)'"

Nick
[email protected]

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of
> chris wallace
> Sent: 12 January 2004 11:39
> To: statalist
> Subject: Re: st: RE: file write a long string from an rclass program
>
>
> On Mon, 2004-01-12 at 10:35, Nick Cox wrote:
> > Same result if you put (`r(rf)') ??
>
> Not the same, but fails with the error
> 103 invalid name
> r(198);
>
> The only place 103 appears is at the end of the string, the final
> "words" of which are "... 0.000 0.103"
>
> > Nick
> > [email protected]
> >
> > chris wallace
> >
> > > I have an rclass program which returns a long string in
> > > r(rf).  I want
> > > to write this string to a file.  I can do this using
> > > . file write `FH' (r(rf)) _n
> > > when the string is not too long, but it is truncated when
> > > it exceeds 244
> > > characters due to stata's limit on strings.
> > >
> > > So, is there an alternative method to either:
> > > - return the long string in a different way so it is more
> > > usable in file
> > > write
> > > or
> > > - call file write differently so r(rf) doesn't get
> > > evaluated (which is
> > > when the truncation occurs)?
> >
> > *
> > *   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/



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