Re: [R] how to print a data.frame without row.names

From: Romain Francois <francoisromain_at_free.fr>
Date: Wed 03 Aug 2005 - 00:05:19 EST

Le 02.08.2005 15:45, Heinz Tuechler a écrit :

>Dear All,
>is there a simple way to print a data.frame without its row.names?
>
>example:
>datum <- as.Date(c("2004-01-01", "2004-01-06", "2004-04-12"))
>content <- c('Neujahr', 'Hl 3 K.', 'Ostern')
>df1 <- data.frame(datum, content)
>print(df1)
>
> datum content
>1 2004-01-01 Neujahr
>2 2004-01-06 Hl 3 K.
>3 2004-04-12 Ostern
>
>Can I get this "table" without 1, 2, 3 ?
>
>
See write.table and its row.names argument

R> write.table(df1, row.names=FALSE)

Romain

-- 
visit the R Graph Gallery : http://addictedtor.free.fr/graphiques
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
~~~~~~      Romain FRANCOIS - http://addictedtor.free.fr         ~~~~~~
~~~~        Etudiant  ISUP - CS3 - Industrie et Services           ~~~~
~~                http://www.isup.cicrp.jussieu.fr/                  ~~
~~~~           Stagiaire INRIA Futurs - Equipe SELECT              ~~~~
~~~~~~   http://www.inria.fr/recherche/equipes/select.fr.html    ~~~~~~
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~

______________________________________________
R-help@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
Received on Wed Aug 03 00:12:32 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:39 EST