[R] Getting all possible combinations

peter dalgaard pdalgd at gmail.com
Thu Aug 24 15:15:14 CEST 2017


> On 24 Aug 2017, at 11:58 , peter dalgaard <pdalgd at gmail.com> wrote:
> 
> apply(M, 1, function(i) sum((2^(0:4))[i]))

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list