From: "M. Edward (Ed) Borasky" Date: 2006-06-20T11:25:23+09:00 Subject: Re: Numeric roadmap? stuart yarus wrote: >> Why not do what R did --- define "scalars" as vectors of length 1 and >> make the vector the basic numeric type? >> > > > Then you have a conformability problem. How do you multiply a vector > times a scalar? If a scalar is represented by a vector of length one, > "doubling" a vector of length greater than one won't work or will > require special code. Ah, but R, like S, uses something called the recycling rule. Vector A of length N times vector B of length M is defined by recycling the shorter vector from the end back to the beginning. So [3 4 5] * [3] is [9 12 15], [2 3] + [7 8 9] is [9 11 11], etc. -- M. Edward (Ed) Borasky http://linuxcapacityplanning.com