# Re: [S] applying a function element-wise to two lists

srosenfeld@nesdis.noaa.gov
Tue, 14 Apr 98 12:15:17 -0500

Dear S'ers:

Can anybody help me in solving the following problem:
I have a series of complex numbers z[i], i=1,....,N
There are numerous repetitions in these numbers. For example, N is of order
1,000,000. However, only ~20,000 of z[i] are different. I need to assign a
unique name or number to each of z[i] in such a way that equal z have the same
name.
For example, I have

z_c(0+0i,1+0i,0+1i,1+1i,10+1i,0+1i,0+1i,1+1i,10-1i,0+1i,10+1i,0+1i,0+1i,1+1i)

I need to name them as follows
names(z)_c("z1","z2","z3","z4","z5","z3","z3","z4","z6","z3","z5","z3","z3","z4"
)

In order to get the result until the end of this century, I want to avoid
looping, and especially double looping.

Thank you

Simon Rosenfeld
NOAA Science Center,
NESDIS/Satellite Research Lab
Camp Springs, MD
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news