Skip to content
Back to formatted view

Raw Message

Message-ID: <1295294707803-3221255.post@n4.nabble.com>
Date: 2011-01-17T20:05:07Z
From: Pete Brecknock
Subject: How to doulbe all the value on a matrix
In-Reply-To: <1295293767474-3221252.post@n4.nabble.com>

I believe you want to select a subset of rows and subset of columns of your
original matrix m.

If you had wanted only the first row of m, you could have used m[1,] 

Alternatively, if you had wanted only the second column of m then you could
have used m[,2] 

m[1,2] would give you the element at row 1, column 2.

You are requesting rows 2,7, and 8 and columns 1,4,6 and 7.

The syntax is m[required rows, required columns]

c() allows you to specify multiple rows/columns at the same time.    

HTH

Pete
-- 
View this message in context: http://r.789695.n4.nabble.com/How-to-doulbe-all-the-value-on-a-matrix-tp3221213p3221255.html
Sent from the R help mailing list archive at Nabble.com.