Date: Thu, 18 Nov 2004 17:03:23 -0500
Reply-To: Fred <email@example.com>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Fred <ieaggie2002@GMAIL.COM>
Subject: How to refer to any or all column variables of a data matrix?
Content-Type: text/plain; charset=US-ASCII
I was always confused and trapped in the array operations in SAS.
Suppose I have two big big data sets, each contains more that 20
Therefore, it is impossible to explicitly write their exact names in code.Rather
we have to refer to each distinct variable by using its index or order
in the data set.
Data set 1 named D1:
var1_1 var1_2 var1_3 var1_4 .... var1_m
Data se 2 named D2:
var2_1 var2_2 var2_3 var2_4 .... var2_n
For example, I need to do correlation between one variable in D1 with
another specific one in D2.
That is, to compute correlation(var1_i, var2_j), s1<=i<=m, s1+1 <= j <= n.
Note: The number m and n are not pre-defined. s1 is a fixed number.
Anyone has similar experience on matrix referring problem like the above?
Thanks a lot in advance.