>I have some code
>
>
> Xj<-X[Jlist[[M]],Xjlist[[M]],drop=F]
>
>
>which I use to partition the matrix X. However
>when the second argument is a single number, Xj is not a
matrix but a >vector. I thought the drop=F argument should have kept Xj a
matrix.
It does work, look at the following example
> X
[,1] [,2] [,3]
[1,] 1 5 6
[2,] 2 6 6
[3,] 3 7 8
[4,] 4 8 8
> Xj<-X[c(2,3),c(1,2),drop=F]
> Xj
[,1] [,2]
[1,] 2 6
[2,] 3 7
> Xj<-X[c(2,3),2, drop=F)
> Xj
[,1]
[1,] 6
[2,] 7
> is.matrix(Xj)
[1] TRUE
>
>
>I am using version 0.90.1
This is probably your problem, you a bit out of date now, R
1.0.1 has been available since
14/04/2000!! Get the latest version, I gather many things
have changed from pre 1.0.0.
>
>
>Can someone tell me how I''m wrong?
>
>
>Thanks
>Ross Darnell
Hope this helps.
Gary.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._