"Shubha Vishwanath Karanth" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Thank you very much Mark! That worked Just a question, ?[ does
> give an error to me...how do I find it?
Try:
?"["
__
R-help@r-project.org mailing list
https://sta
-
From: Shubha Vishwanath Karanth
Sent: Tuesday, May 06, 2008 8:50 PM
To: 'Mark Leeds'
Subject: RE: [R] To preserve the class "Matrix"
Thank you very much Mark! That worked Just a question, ?[ does give an
error to me...how do I find it?
Shubha Karanth | Amba Research
Hi,
Suppose
a=matrix(1:9,3,3)
> a
[,1] [,2] [,3]
[1,]147
[2,]258
[3,]369
Now,
> class(a[1:2,])
[1] "matrix"
> class(a[1:3,])
[1] "matrix"
> class(a[,1:2])
[1] "matrix"
> class(a[,1:3])
[1] "matrix"
But,
> class(a[1,])
[1] "i
3 matches
Mail list logo