[R] print only a few lines of an object

Naresh Gurbuxani n@re@h_gurbux@n| @end|ng |rom hotm@||@com
Wed Mar 23 19:44:01 CET 2022


In an R session, when I type the name of an object, R prints the entire object (for example, a 20000 x 5 data.frame).  Is it possible to change the default behavior so that only the first five and last five rows are printed?  

Similarly, if the object is a 20000 x 200 matrix, the default behavior will be to print first five and last five columns, combined with first five and last five rows.  

Thanks,
Naresh


More information about the R-help mailing list