[R] how to use print() without column names?

Kjetil Brinchmann Halvorsen kjetil at acelerate.com
Wed Dec 1 23:34:15 CET 2004


Hu Chen wrote:

>Hi all,
>any guy who knows how to print a data frame without column names printed?
>I didn't find a parameter in print() function to turn off this.
>Neither in options().
>Thanks in advance.
>
>______________________________________________
>R-help at 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
>
>
>  
>
If your data.frame is purely numerical, seems like you can do:
library(MASS)
names(your.df) <- NULL
write.matrix(your.df)

Kjetil

-- 

Kjetil Halvorsen.

Peace is the most effective weapon of mass construction.
               --  Mahdi Elmandjra




More information about the R-help mailing list