Skip to content
Prev 313051 / 398503 Next

data manipulation between vector and matrix

HI,
The option z5 takes care of it.
z5<-t(x-t(mat)) #still faster than ?sweep()
?dim(z5)
[1] 20? 2
?identical(sweep(-mat,2,x,"+"),z5)
#[1] TRUE


A.K.
Message-ID: <1354745784.89940.YahooMailNeo@web142603.mail.bf1.yahoo.com>
In-Reply-To: <CAE2FW2=yBDeo5GZgEOL5qD8WogzxNiq4A1+kVzqeGHvNWf06+Q@mail.gmail.com>