[R] 'less' for R?

Romain Francois francoisromain at free.fr
Wed Mar 8 18:36:42 CET 2006


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                                  |
+---------------------------------------------------------------+




More information about the R-help mailing list