[R] to print dataframe

Petr Pikal petr.pikal at precheza.cz
Thu Feb 24 11:13:47 CET 2005


Hi

Perhaps write.table(...., row.names=FALSE)

Cheers
Petr


On 23 Feb 2005 at 15:39, sim76 at tiscali.it wrote:

> Dear all, 
> 
> Is it possible to print a dataframe without the row numbers? 
> For example if I have a dataframe like that: 
> >df <-
> >data.frame(name1=sample(LETTERS,10),name2=sample(c(0,1),10,replace=TR
> >UE))
> 
> after printing 
>    name1 name2 
> 1      O     1 
> 2      H     0 
> 3      R     0 
> 4      T     0 
> 5      V     1 
> 6      E     0 
> 7      W    0 
> 8      P     1 
> 9      G     0 
> 10     J     1 
> > 
> 
> 
> But I would like the dataframe printed like that 
> 
>    name1 name2 
>      O      1 
>      H      0 
>       R     0 
>       T     0 
>      V      1 
>      E      0 
>      W     0 
>      P      1 
>      G     0 
>     J       1 
> 
> I look at ?print.dataframe ?data.frame but I can't find anything.
> Somebody could help me? Thanks in advance.
> 
> __________________________________________________________________
> Tiscali Adsl 3 Mega Flat, 3 MESI GRATIS! Con Tiscali Adsl 3 Mega Flat
> navighi in Rete alla supervelocita' a soli 29.95 euro al mese senza
> limiti di tempo. Attivati entro il 28 Febbraio 2005, 3 MESI sono
> GRATIS Scopri come http://abbonati.tiscali.it/adsl/sa/2flat_tc/
> 
> ______________________________________________
> 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

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list