Hi All, is there an equivalent of the Unix command 'less' (or 'more'), so I can look at what's inside a data.frame or a matrix without having it printed out on console? I am using R on Debian Linux and Mac OS 10.4.5 Cheers, F -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 7594 1602 Fax (+44) 020 7594 3193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
On 3/8/2006 12:03 PM, Federico Calboli wrote:> Hi All, > > is there an equivalent of the Unix command 'less' (or 'more'), so I can > look at what's inside a data.frame or a matrix without having it printed > out on console? > > I am using R on Debian Linux and Mac OS 10.4.5I think you want page(). head() and tail() are also useful, as equivalents to the head and tail commands. Duncan Murdoch
Le 08.03.2006 18:03, Federico Calboli a ?crit :> Hi All, > > is there an equivalent of the Unix command 'less' (or 'more'), so I can > look at what's inside a data.frame or a matrix without having it printed > out on console? > > I am using R on Debian Linux and Mac OS 10.4.5 > > Cheers, > > F >Hi, A cheap way is to use the unix command :> less <- function(a){ > write.table(a, quote=F, file="/tmp/dataframe.txt") > system("less /tmp/dataframe.txt") > } > less(iris)Romain -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques Discover the R Movies Gallery : http://addictedtor.free.fr/movies +---------------------------------------------------------------+ | Romain FRANCOIS - http://francoisromain.free.fr | | Doctorant INRIA Futurs / EDF | +---------------------------------------------------------------+
you can also use str(data.frame) which allows you to access the structure of your object. Florence. On 3/8/06, Federico Calboli <f.calboli@imperial.ac.uk> wrote:> > Hi All, > > is there an equivalent of the Unix command 'less' (or 'more'), so I can > look at what's inside a data.frame or a matrix without having it printed > out on console? > > I am using R on Debian Linux and Mac OS 10.4.5 > > Cheers, > > F > > -- > Federico C. F. Calboli > Department of Epidemiology and Public Health > Imperial College, St Mary's Campus > Norfolk Place, London W2 1PG > > Tel +44 (0)20 7594 1602 Fax (+44) 020 7594 3193 > > f.calboli [.a.t] imperial.ac.uk > f.calboli [.a.t] gmail.com > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >[[alternative HTML version deleted]]