comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » edit a large dataset
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
edit a large dataset [message #56102] Wed, 03 October 2007 07:48
queiny is currently offline  queiny
Messages: 15
Registered: November 2005
Junior Member
Hi, I have a large dataset (>1e7 records). One field of the record is
a string 'landuse'. Now I want to add one more field based on the
'landuse', i.e., if it is 'forest', then add 'aa', if it is 'urban',
then add 'bb', etc.. Since there are more than 20 different landuse,
use 'if-then', or 'case' for each record will be quite inefficient.

I am thinking of 'sort' the records based on 'landuse', and then use
'uniq' to locate the starting point and number of records for each
'landuse' type and add the new fields accordingly. But how could I go
back to the original order afterward?

a=sort(data_orig)
data_sorted=data_orig(a)
;processing based on 'data_sorted'

but how could I go back the order of 'data_orig'? Is there a inversion
of 'sort'.

Thanks,
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: label x axis
Next Topic: Re: label x axis

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 08:42:28 PDT 2025

Total time taken to generate the page: 0.72146 seconds