Skip to content
Prev 74782 / 398502 Next

how to print a data.frame without row.names

Martin Maechler <maechler at stat.math.ethz.ch> writes:
Unless a column or a header is 8 chars or wider (and UrbanPop is!).

This seems to do it:

  x <- as.matrix(format(USArrests))
  rownames(x) <- rep("", nrow(x))
  print(x, quote=FALSE, right=TRUE)