[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Re-defining a variable's type but keeping it "in place"
You could make use of -order-
order *1 *2
See help on -order-.
> I have a tab-separated data set which contains a number of
> dates entered as strings. Converting the strings to dates is
> no problem using the 'date' function, but the new variable is
> added to the end of the data set. For example, if I have a
> data set that has the following variables
> id stringdate1 info1 stringdate2 info2
> (where the stringdates are dates encoded as strings) and I
> cast the strings into real dates (and delete the strings), I
> end up with a data set that looks like
> id info1 info2 realdate1 realdate2
> Not a problem for a data set with five columns, but real data
> sets are much broader. In any case, it would be nice to keep
> all the '1' data items together etc.
> Can I convert data 'in place' or move columns back to their
> 'original' positions?
* For searches and help try: