Hi Just a simple question really. I?ve got these large 2d matrices that I?d like to inspect, but not from start to finish. The head() command is convenient when columns are few. For large nxn matrices, however, head() and head.matrix() are still cumbersome. Is there a simple way of viewing both the columnwise and rowwise heads of a matrix? cheers, Bruce -- View this message in context: http://r.789695.n4.nabble.com/head-matrix-unintelligent-tp3002346p3002346.html Sent from the R help mailing list archive at Nabble.com.
On 19/10/2010 12:10 PM, brbell01 wrote:> Hi Just a simple question really. I?ve got these large 2d matrices that I?d > like to inspect, but not from start to finish. The head() command is > convenient when columns are few. For large nxn matrices, however, head() and > head.matrix() are still cumbersome. Is there a simple way of viewing both > the columnwise and rowwise heads of a matrix?i <- 1:5 M[i,i] Duncan Murdoch
You want the 'corner' function. It isn't (yet) in an R package but you can find it to 'source' it in near the bottom of the 'Public Domain Code' page of www.burns-stat.com Your case is precisely the reason that 'corner' came into being. On 19/10/2010 17:10, brbell01 wrote:> > Hi Just a simple question really. I?ve got these large 2d matrices that I?d > like to inspect, but not from start to finish. The head() command is > convenient when columns are few. For large nxn matrices, however, head() and > head.matrix() are still cumbersome. Is there a simple way of viewing both > the columnwise and rowwise heads of a matrix? > > cheers, > Bruce-- Patrick Burns pburns at pburns.seanet.com http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno')