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

Re: st: RE: notes lost in append


From   Devra Golbe <[email protected]>
To   [email protected]
Subject   Re: st: RE: notes lost in append
Date   Tue, 11 May 2004 09:48:56 -0400

I thank Fred and Nick for their responses to my question about appending notes.

For the short-term, I would be happy to try Fred's suggestion if only I could figure out how to do it. Having checked the documentation, I can't see how to retrieve the notes from a data set in order to copy them into a new data set. Are they stored in some retrievable variable?

For the long-term, I think it would be useful if -append- retained notes in the using data set, renumbering if necessary, and, if feasible, adding an option to add the source data set to the note.

At 02:25 PM 5/8/2004, Fred Wolfe wrote:

I think there is a possible work-around. As notes are stored as -var[note(n)]:-, one could pull off the notes from each data set prio to the append/merge, compare them and then merge them into the master set according to some rule. I could see how this might be useful.

Fred

At 12:45 PM 5/8/2004, Nick Cox wrote:

What kind of work-around are you expecting?

Stata's problem, I think, is that it expects at most one
note for each combination of name and number, e.g. "mpg"
and "1".

In addition, as the variables in the datasets typically
have the same names -- little point in -append-ing
otherwise -- it is difficult to think of a work-around
other than having unique variable names in each dataset,
to each of which you attach -notes-. I haven't tested that.

A clumsier alternative is to store text in a string
variable in each dataset.

Devra Golbe

> I would like to append two data files each having notes.  As
> the output
> below indicates,  notes from the "using" file are evidently
> not retained
> when the master file already contains notes on the same
> variable.  The same
> is true for a note attached to the file as a whole:  while it
> is possible
> to have multiple notes, if the master file contains such
> notes, none are
> retained from the using file.
>
> Does anyone know of a work-around?
>
> Thanks,
> Devra
>

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